diff options
Diffstat (limited to 'app/blog/views.py')
-rw-r--r-- | app/blog/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/blog/views.py b/app/blog/views.py index bfdc593..02acef4 100644 --- a/app/blog/views.py +++ b/app/blog/views.py @@ -42,7 +42,7 @@ def entry_list(request,page): 'page':page, 'MEDIA_URL': settings.BAKED_MEDIA_URL } - except: + except KeyError: 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=extra_context) @@ -68,7 +68,7 @@ def entry_list_by_area(request,slug,page): try: region = Region.objects.get(slug__exact=slug) qs = Entry.objects.filter(status__exact=1,region = region).order_by('-pub_date') - except: + except KeyError: region = Country.objects.get(slug__exact=slug) qs = Entry.objects.filter(status__exact=1,location__state__country = region).order_by('-pub_date') if not region: |