On Tue, Mar 28, 2006 at 08:44:48PM +0200, Arthur wrote: > That's similar to what I do. The get_absolute_url() concatenates a > <SOME_APP>_BASE_URL from settings.py or from the top of models.py with > what you call get_id_for_url. This isn't completely clean but easy to > change if you remember where to look for the constant.
Because the "url" for an object might be different depending on how you wanted to "see" that object (i.e. depending on the current view), in your way you'd have to make "get_absolute_url" not actually be the ABSOULTE URL... and THAT is the point in what I was suggesting. That the part of the URL "in front" of the object's unique part is not a constant for the entire settings.py, but rather is variable based on the view / tempalte. -- Glenn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---