<NME> widgets.py
<BEF> from __future__ import absolute_import
from django.forms import TextInput
from django import template

class AddressWithMapWidget(TextInput):
    width = 700
    height = 200
    zoom = 16

    def render(self, name, value, attrs=None):
        tpl = "{{% load easy_maps_tags %}}" \
              "{{% easy_map address {0.width} {0.height} {0.zoom} %}}".format(self)
        map_template = template.Template(tpl)
        context = template.Context({'address': value})

        default_html = super(AddressWithMapWidget, self).render(name, value, attrs)
        return default_html + map_template.render(context)

<MSG> code clean up and re-factoring

<DFF> @@ -1,17 +1,21 @@
-from __future__ import absolute_import
-from django.forms import TextInput
+# -*- coding: utf-8 -*-
+
 from django import template
+from django.forms import TextInput
+
 
 class AddressWithMapWidget(TextInput):
     width = 700
     height = 200
     zoom = 16
 
+    tpl = "{{% load easy_maps_tags %}}{{% easy_map address {0.width} {0.height} {0.zoom} %}}"
+
     def render(self, name, value, attrs=None):
-        tpl = "{{% load easy_maps_tags %}}" \
-              "{{% easy_map address {0.width} {0.height} {0.zoom} %}}".format(self)
-        map_template = template.Template(tpl)
-        context = template.Context({'address': value})
+        output = super(AddressWithMapWidget, self).render(name, value, attrs)
 
-        default_html = super(AddressWithMapWidget, self).render(name, value, attrs)
-        return default_html + map_template.render(context)
+        t = template.Template(self.tpl.format(self))
+        context = template.Context({
+            'address': value,
+        })
+        return output + t.render(context)

code clean up and re-factoring