diff options
Diffstat (limited to 'apps/blog/views.py')
-rw-r--r-- | apps/blog/views.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/blog/views.py b/apps/blog/views.py index bd583df..20044b0 100644 --- a/apps/blog/views.py +++ b/apps/blog/views.py @@ -3,16 +3,20 @@ from django.template import RequestContext from django.views.generic.date_based import object_detail from django.views.generic.list_detail import object_list from django.http import Http404 +from django.conf import settings from blog.models import Entry, Topic from locations.models import Region, Country -from photos.models import Photo +from photos.models import Photo, PhotoGallery +from chunks.models import Chunk def home(request): featured = Entry.objects.filter(status__exact=1).latest() + gallery = PhotoGallery.objects.latest() context = { 'featured': featured, + 'gallery': gallery } return render_to_response('archives/homepage.html', context, context_instance = RequestContext(request)) @@ -67,3 +71,14 @@ def entry_list_by_area(request,slug,page): return object_list(request, queryset=qs, template_name='archives/writing.html', extra_context=context) +def about(request): + top = Chunk.objects.get(key='about_top') + middle = Chunk.objects.get(key='about_middle') + bottom = Chunk.objects.get(key='about_bottom') + context = { + 'top': top, + 'middle': middle, + 'bottom': bottom, + 'IMAGES_URL' : settings.IMAGES_URL + } + return render_to_response('details/about.html', context, context_instance=RequestContext(request))
\ No newline at end of file |