Matt Riggott wrote: > from django.core.urlresolvers import reverse > > def absolute_url(viewname, *args, **kwargs): > return reverse(viewname, args=args or [], kwargs=kwargs or {})
As far as I can tell you don't need 'or []' and 'or {}' since they will be [] and {} already when nothing is passed... > Is there any chance this could be included in Django? It might sit > nicely in somewhere like django.shortcuts. +1 (but I'd rather keep the name 'reverse') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---