~jmillikin/pixras/trunk

« back to all changes in this revision

Viewing changes to pixra/views/gallery.py

  • Committer: John Millikin
  • Date: 2009-01-14 22:34:51 UTC
  • Revision ID: jmillikin@gmail.com-20090114223451-rb2zdh8bc32bywyk
Corrected calls to ``get_gallery()`` in the gallery views.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
        if not gallery_id:
73
73
                return None
74
74
                
75
 
        gallery = get_gallery (gallery_id)
 
75
        gallery = get_gallery (request, gallery_id)
76
76
        image = get_image (pk = request.POST['image_id'])
77
77
        gallery.add_image (image)
78
78
        view_href = reverse (gallery_resource, args = (gallery.pk,))
86
86
@post_only
87
87
@ajax_response
88
88
def remove_image (request):
89
 
        gallery = get_gallery (request.POST['gallery_id'])
 
89
        gallery = get_gallery (request, request.POST['gallery_id'])
90
90
        image = get_image (pk = request.POST['image_id'])
91
91
        gallery.remove_image (image)
92
92
        return True