示例#1
0
文件: views.py 项目: ILDAR9/ftsrt
def album_list(request, album_id):
    for album in get_albums():
        if album.gphoto_id.text == album_id:
            photos = get_photos(album)
            return render(request, 'picasagallery/album.html', {'photos': photos, 'album_name': album.title.text},
                          context_instance=RequestContext(request))
    raise Http404()
示例#2
0
def album(request):
    print('tut static url' + settings.STATIC_URL )
    album = get_albums()[0]
    if (album):
        photos = get_photos(album)
        return render_to_response('picasagallery/home.html',
                                  {'username': auth.get_user(request).username,'photos': photos, 'album': album})
    raise Http404()
示例#3
0
文件: views.py 项目: ILDAR9/ftsrt
def gallery(request):
    albums = get_albums()
    return render(request, 'picasagallery/gallery.html', {'albums': albums},
                  context_instance=RequestContext(request))
示例#4
0
文件: views.py 项目: azamtau/pyBlog
def gallery(request):
    albums = get_albums()
    return render(request, 'picasagallery/gallery.html', {'albums': albums})
示例#5
0
文件: views.py 项目: azamtau/pyBlog
def album_list(request, album_id):
    for album in get_albums():
        if album.gphoto_id.text == album_id:
            photos = get_photos(album)
            return render(request, 'picasagallery/album.html', {'photos': photos, 'album': album})
    raise Http404()
示例#6
0
def gallery(request):
    albums = get_albums()
    return render(request, 'picasagallery/gallery.html', {'albums': albums})
示例#7
0
def album_list(request, album_id):
    for album in get_albums():
        if album.gphoto_id.text == album_id:
            photos = get_photos(album)
            return render(request, 'picasagallery/album.html', {'photos': photos, 'album': album})
    raise Http404()