def get_context_data(self, **kwargs):
     objs = self.object_list.values('geom', 'page__name')
     region = self.get_region()
     map_objects = [
         (o['geom'].ewkt, o['page__name'], page_url(o['page__name'], region))
         for o in objs
     ]
     return map_objects
 def get_context_data(self, **kwargs):
     objs = self.object_list.values('geom', 'page__name')
     region = self.get_region()
     map_objects = [(o['geom'].ewkt, o['page__name'],
                     page_url(o['page__name'], region)) for o in objs]
     return map_objects
def popup_html(mapdata=None, pagename=None):
    if mapdata:
        pagename = mapdata.page.name
    url = page_url(pagename, mapdata.region)
    return mark_safe('<a href="%s">%s</a>' % (url, pagename))
 def location(self, obj):
     pagename, region_slug = obj
     # Sort of a mock here.
     return page_url(pagename, MockRegion(region_slug))
def popup_html(mapdata=None, pagename=None):
    if mapdata:
        pagename = mapdata.page.name
    url = page_url(pagename, mapdata.region)
    return mark_safe('<a href="%s">%s</a>' % (url, pagename))
 def location(self, obj):
     pagename, region_slug = obj
     # Sort of a mock here.
     return page_url(pagename, MockRegion(region_slug))