diff options
Diffstat (limited to 'app/blog/views.py')
-rw-r--r-- | app/blog/views.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/app/blog/views.py b/app/blog/views.py index 8d14fe3..5a7d03b 100644 --- a/app/blog/views.py +++ b/app/blog/views.py @@ -36,8 +36,16 @@ List of all writing def entry_list(request,page): request.page_url = '/writing/%d/' request.page = int(page) + try: + is_build = request.POST['builder'] + extra_context={ + 'page':page, + 'MEDIA_URL': settings.BAKED_MEDIA_URL + } + except: + extra_context={'page':page} qs = Entry.objects.filter(status__exact=1).order_by('-pub_date').select_related() - return object_list(request, queryset=qs, template_name='archives/writing.html', extra_context={'page':page}) + return object_list(request, queryset=qs, template_name='archives/writing.html',extra_context=extra_context) """ @@ -65,9 +73,14 @@ def entry_list_by_area(request,slug,page): qs = Entry.objects.filter(status__exact=1,location__state__country = region).order_by('-pub_date') if not region: raise Http404 - context = { - 'region': region, - } + try: + is_build = request.POST['builder'] + extra_context={ + 'region': region, + 'MEDIA_URL': settings.BAKED_MEDIA_URL + } + except: + extra_context={'region': region,} return object_list(request, queryset=qs, template_name='archives/writing.html', extra_context=context) |