summaryrefslogtreecommitdiff
path: root/app/projects
diff options
context:
space:
mode:
Diffstat (limited to 'app/projects')
-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)