(long dead thread resuscitation attempt) I'm not sure I understand your objections. Why would absolute url change? And if it does you still have to worry about external links breaking.
Surely the answer is to ensure you don't change the value of get_absolute_url. Don't base it on anything that's likely to change. On Tuesday, 14 February 2012 15:14:03 UTC, Diederik van der Boor wrote: > > > Op 13 feb. 2012, om 18:50 heeft Jonathan Paugh het volgende geschreven: > > Each model supports a get_absolute_url(self) method, which allows you to > retrieve each object's url in whatever way you want, including pulling > values from self (i.e. the model object.). Returned urls are in serveral > formats; my prefered is '/full/path/to/article'. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]<javascript:> > . > To unsubscribe from this group, send email to > [email protected] <javascript:>. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > I'm reluctant to use such method, when the absolute URL changes, the links > break. > With a "pageid://##" solution I dynamically get get_absolute_url() when > it's read. > > Also, this solution gives me another problem: the URL needs to be reversed > to find the ID > which was used in the select box / raw_id_field to choose the model. > > if the solution still involves storing the value in a string field, > I still prefer my solution of storing the ID over a copied URL. > > Diederik > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/S7IXXp_TK6wJ. To post to this group, send email to [email protected]. 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.

