It looks nice indeed, I'll probably give it a go :-) But then, is this not going against the DYR principle? In my case, if I have to change my mind I simply have to change a varialbe, while in your case I've to change the whole lot of templates, even if your option might be 'cleaner'.
Another option would be to extract automatically my GUINDILLA_CALENDAR_BASE from the views with a urlresolvers, but it's even messier. Thanks, G On 11/18/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > Guillermo Fernandez Castellanos wrote: > > In that case, people tend to hardcode teh /event/ part into the > > get_absolute_url function of the model. > > There's a better (IMHO) way to do this with reverse url lookup for a > given view that Adrian has added not long before 0.95. Usually an app > knows its views so it can construct actual URLs for them. There's a > ticket with a patch that brings it into templates: > http://code.djangoproject.com/ticket/2606 > > It works like this: > > {% url events.views.some_view %} > > ... (assuming that 'events' is an app added in INSTALLED_APPS). > > P.S. Disclosure: I'm the one who wrote the patch so feel free to ask > questions and make suggestions. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---