def render(self, name, value, *args, **kwargs):
        try:
            lat = value.lat
            lng = value.lng
        except __HOLE__:
            lat = settings.DEFAULT_LATITUDE
            lng = settings.DEFAULT_LONGITUDE
        js = '''
        </script>
        <script type="text/javascript">
            //<![CDATA[
            var %(name)s_marker ;
            $(document).ready(function () {
                if (GBrowserIsCompatible()) {
                    var map = new GMap2(document.getElementById("map_%(name)s"));
                    map.setCenter(new GLatLng(%(default_lat)s,%(default_lng)s), 13);
                    %(name)s_marker = new GMarker(new GLatLng(%(default_lat)s,%(default_lng)s), {draggable: true});
                    map.addOverlay(%(name)s_marker);
                    map.addControl(new GLargeMapControl());
                    map.addControl(new GMapTypeControl());
                    $('#%(name)s_id')[0].value = %(name)s_marker.getLatLng().lat() + "," + %(name)s_marker.getLatLng().lng();
                    GEvent.addListener(%(name)s_marker, "dragend", function() {
                        var point = %(name)s_marker.getLatLng();
                        $('#%(name)s_id')[0].value = point.lat() + "," + point.lng();
                    });
                }});
            $(document).unload(function () {GUnload()});
            //]]>
        </script>
        ''' % {'name': name, 'default_lat': lat, 'default_lng': lng}
        # % dict(name=name)
        html = self.inner_widget.render("%s" % name, None, dict(id='%s_id' % name))
        html += "<div id=\"map_%s\" style=\"width: 500px; height: 500px\"></div>" % name
        return mark_safe(js+html)
dataset/ETHPy150Open albatrossandco/brubeck_cms/brubeck/mapping/fields.py/LocationWidget.render