summaryrefslogtreecommitdiff
path: root/app/blog/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2012-10-21 22:05:26 -0400
committerluxagraf <sng@luxagraf.net>2012-10-21 22:05:26 -0400
commit5f12708dde05c6d6fc4cc089c6c93b67120b8f38 (patch)
treef63606b4e90409f5e3f34b540d793b78bea1e792 /app/blog/views.py
parent665cc2293083879dbcbc6a56d174aca67f632767 (diff)
fixed two bugs, gif projs now get built and the archive list views for writing and photos check to see if the request is from the django client and adjust MEDIA_URL accordingly
Diffstat (limited to 'app/blog/views.py')
-rw-r--r--app/blog/views.py21
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)