Ok, just trying to do some extra work on the data before i output it
to a date_based.object_detail generic view.

I can't seem to make a simple wrapper for it so that it is handled
with a view. I've tried alot of options, here's where I'm at right
now:


urls.py:

(r'^blog/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\d{2})/(?
P<slug>[a-zA-Z0-9\-]+)/$', 'blog.views.blog_post'),


blog/views.py:

from django.views.generic.date_based import object_detail
from jj.blog.models import Tag, Post

def blog_post(request, year, month, day, slug):
        return object_detail(request, year, month, day, queryset =
Post.objects.all(), date_field='pub_date', slug, slug_field='slug')


I dont understand the "Either object_id or (slug and slug_field) is
required." thing. Do i provide another variable
(e.g:slug_field='slug')? If so, what order should the varibles be in?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to