Re: Django Generic Date Views

2018-08-10 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Gerald, Couple of points: - - please try to stick to the mailing list when posting follow-up questions or materials rather than replying off-list; this makes it possible for other people to jump in and offer their advice (and also doesn't s

Re: Django Generic Date Views

2018-08-09 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Thu, Aug 09, 2018 at 07:54:29PM +0800, Gerald Brown wrote: > One thing I discovered is that I had the line for the url.py file in my top > level url.py.  I moved it to myapp/url.p but still same 404 error, however > no longer get the "has no attri

Re: Django Generic Date Views

2018-08-09 Thread Gerald Brown
One thing I discovered is that I had the line for the url.py file in my top level url.py.  I moved it to myapp/url.p but still same 404 error, however no longer get the "has no attribute" error How do I call this view?  Tried from the browser "http://127.0.0.1:8000/today/"; and I get "__init__

Re: Django Generic Date Views

2018-08-09 Thread Michal Petrucha
On Wed, Aug 08, 2018 at 05:42:06AM -0700, Gerald Brown wrote: > > > On Wednesday, August 8, 2018 at 8:15:21 PM UTC+8, Jason wrote: > > > > what have you tried so far? What issues are you having with the > > documentation examples? > > > > "can't get them to work" is really uninformative, RIGHT

Re: Django Generic Date Views

2018-08-08 Thread Gerald Brown
As far as I know both "vi" and "queryset" are variable names and can be called "anything" On Thursday, August 9, 2018 at 12:08:07 AM UTC+8, Jason wrote: > > 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 d

Re: Django Generic Date Views

2018-08-08 Thread Jason
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(

Re: Django Generic Date Views

2018-08-08 Thread Jason
are you sure your url is in admin/visit? path('today/', PaymentTodayArchiveView, name="today"), 404 says you have a url routing issue, not a view issue. On Wednesday, August 8, 2018 at 8:42:06 AM UTC-4, Gerald Brown wrote: > > > > On Wednesday, August 8, 2018 at 8:15:21 PM UTC+8, Jason wrote: >>

Re: Django Generic Date Views

2018-08-08 Thread Gerald Brown
On Wednesday, August 8, 2018 at 8:15:21 PM UTC+8, Jason wrote: > > what have you tried so far? What issues are you having with the > documentation examples? > > "can't get them to work" is really uninformative, RIGHT. > What I tried was the TodayArchiveView by following the docs. When I enter

Re: Django Generic Date Views

2018-08-08 Thread Jason
what have you tried so far? What issues are you having with the documentation examples? "can't get them to work" is really uninformative, -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

Django Generic Date Views

2018-08-08 Thread Gerald Brown
Greetings: Tonight I discovered something at https://docs.djangoproject.com/en/2.1/ref/class-based-views/generic-date-based/ that I thought is just what I am looking for. The only problem is I can't get them to work. They are designed to present views by Year, Month, Week, Day, Today or spec