summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/media/views.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/media/views.py b/app/media/views.py
index de84f7f..29d3eca 100644
--- a/app/media/views.py
+++ b/app/media/views.py
@@ -4,7 +4,7 @@ from django.template import RequestContext
from django.http import Http404, HttpResponse
from django.core import serializers
-from .models import Photo, PhotoGallery, LuxGallery, LuxImage
+from .models import LuxGallery, LuxImage
from locations.models import Country, Region
from utils.views import PaginatedListView
@@ -52,10 +52,10 @@ class GalleryList(PaginatedListView):
class OldGalleryList(PaginatedListView):
template_name = 'archives/gallery_list.html'
- model = PhotoGallery
+ model = LuxGallery
def get_queryset(self):
- return PhotoGallery.objects.filter(is_public=True)
+ return LuxGallery.objects.filter(is_public=True)
def get_context_data(self, **kwargs):
# Call the base implementation first to get a context
@@ -74,7 +74,7 @@ def gallery_list(request, page):
request.page_url = '/photos/%d/'
request.page = int(page)
context = {
- 'object_list': PhotoGallery.objects.all(),
+ 'object_list': LuxGallery.objects.all(),
'page': page,
}
return render(request, "archives/photos.html", context)
@@ -82,13 +82,13 @@ def gallery_list(request, page):
def gallery(request, slug):
context = {
- 'object': PhotoGallery.objects.get(set_slug=slug)
+ 'object': LuxGallery.objects.get(set_slug=slug)
}
return render(request, 'details/photo_galleries.html', context)
def photo_json(request, slug):
- p = PhotoGallery.objects.filter(set_slug=slug)
+ p = LuxGallery.objects.filter(set_slug=slug)
return HttpResponse(serializers.serialize('json', p), mimetype='application/json')
@@ -114,10 +114,10 @@ def gallery_list_by_area(request, slug, page):
request.page = int(page)
try:
region = Region.objects.get(slug__exact=slug)
- qs = PhotoGallery.objects.filter(region=region).order_by('-id')
+ qs = LuxGallery.objects.filter(region=region).order_by('-id')
except:
region = Country.objects.get(slug__exact=slug)
- qs = PhotoGallery.objects.filter(location__state__country=region).order_by('-id')
+ qs = LuxGallery.objects.filter(location__state__country=region).order_by('-id')
if not region:
raise Http404
context = {