summaryrefslogtreecommitdiff
path: root/app/projects/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2013-04-24 08:22:20 -0400
committerluxagraf <sng@luxagraf.net>2013-04-24 08:22:20 -0400
commitaba098c5c01793a4497b5706215c84b6b16974ba (patch)
treeb921f03e7ce503ad7f971690693f8f75c9d1f0b0 /app/projects/views.py
parent2e0020d91c08fe024d39a5ad646aefb5e0eeac7f (diff)
updated for django 1.5, removed grappelli dependency
Diffstat (limited to 'app/projects/views.py')
-rw-r--r--app/projects/views.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/projects/views.py b/app/projects/views.py
index 90db6ba..e9c755f 100644
--- a/app/projects/views.py
+++ b/app/projects/views.py
@@ -1,6 +1,5 @@
from django.shortcuts import render_to_response,get_object_or_404
from django.template import RequestContext
-from django.views.generic.list_detail import object_list
from django.db.models import get_model
from django.http import HttpResponse
from django.core import serializers
@@ -10,7 +9,7 @@ from projects.models.base import Project
from projects.models.fiveby import FiveBy
from projects.models.natparks import NationalParks
from projects.models.gifs import AnimatedGif
-from projects.models.code import CodeBlogEntry
+
projects = {'5x5':'FiveBy','6x6':'SixBy','national-parks':'NationalParks','code':'Code'}
"""
@@ -23,18 +22,17 @@ def detail(request,slug):
qs = model.objects.filter(visited__exact=True).order_by("-date_visited_begin")
else:
qs = model.objects.filter(status__exact=1)
+ context = {
+ "object_list" : qs,
+ }
template = 'details/%s.html' %(slug)
- return object_list(request, queryset=qs, template_name=template,)
+ return render_to_response(template, context, context_instance = RequestContext(request))
+
def gif_detail(request,slug):
obj = get_object_or_404(AnimatedGif, slug__exact=slug)
return render_to_response('details/gifs.html', {'object': obj}, context_instance=RequestContext(request))
-def code_entry_detail(request, year, month, day, slug):
- obj = get_object_or_404(CodeBlogEntry, slug__exact=slug)
- return render_to_response('details/code_blog.html', {'object': obj}, context_instance=RequestContext(request))
-
-
def data_json(request, id):
qs = NationalParks.objects.filter(pk=id)