Wednesday, August 8, 2018

Re: Django Generic Date Views

also, I note you don't set the queryset field in your view class.  you set it to `vi`.  that's probably an issue there

eg 

from django.views.generic.dates import TodayArchiveView    from myapp.models import Article    class ArticleTodayArchiveView(TodayArchiveView):      queryset = Article.objects.all()  <--       date_field = "pub_date"      allow_future = True

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/067458f4-6bf2-4ada-a18f-a904d72fa81d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment