Exemplo n.º 1
0
def gallery(request, navigation_url):
    photoset = models.Photoset.all().filter('navigation_url = ',navigation_url.lower()).get()
    if photoset is None:
        raise Http404()

    photoset_nav = []
    for ps in models.Photoset.all().order('navigation_order'):
        if not ps.enabled:
            continue
        photoset_nav.append({'photoset':ps,
                             'selected':request.path.startswith(ps.absolute_url)})

    photos = flickr.get_photoset(photoset_id=photoset.photoset_id)
    return 'gallery.html', {'photos':photos,
                            'photoset':photoset,
                            'photoset_nav':photoset_nav}
Exemplo n.º 2
0
 def get_photos(self):
     return flickr.get_photoset(self.photoset_id)