Re: Setting up get_absolute_url with a generic view

2008-04-20 Thread Malcolm Tredinnick
On Sun, 2008-04-20 at 20:16 -0400, Michael wrote: > your days and months can be one your two digits. So: > (r'^(?P\d{4})/(?P > \d{1,2})/(?P\d{1,2})/(?P[a-z0-9-] > +)/$', > > You can always open up a shell and see the error that is not showing > up in your template. Use the reverse function. Chec

Re: Setting up get_absolute_url with a generic view

2008-04-20 Thread Michael
your days and months can be one your two digits. So: (r'^(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/(?P[a-z0-9-] +)/$', You can always open up a shell and see the error that is not showing up in your template. Use the reverse function. Check out: http://www.b-list.org/weblog/2007/sep/06/tips-and-tricks/ O

Re: Setting up get_absolute_url with a generic view

2008-04-20 Thread Eric Abrahamsen
Whoops, sorry, that was bad advice, please ignore! On Apr 20, 2008, at 5:19 AM, Matt wrote: > > I'm trying to get the following get_absolute_url function working in > one of my models: > > >def get_absolute_url(self): >ret

Re: Setting up get_absolute_url with a generic view

2008-04-20 Thread Eric Abrahamsen
Matt, You're using get_absolute_url to return an actual view – it's only meant to return a string representing the the URL for that model instance. The generic view information goes in your URL config file only, and get_absolute_url should return a URL that is matched by one of the regula

Setting up get_absolute_url with a generic view

2008-04-20 Thread Matt
I'm trying to get the following get_absolute_url function working in one of my models: def get_absolute_url(self): return ('django.views.generic.date_based.object_detail', (), { 'year': self.start_date.year,