Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
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))
Exemplo n.º 5
0
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))