On Mon, Sep 14, 2009 at 6:30 PM, drozzy <dro...@gmail.com> wrote: > > get_absolute_url is just a shortcut for one stupid thing: Get some url > returned by the model. > It does not have to be about the object. It can be: google.com. > Whatever! So you tell get_absolute_url does some random stuff, and no contract implied. What it does it do in django core then? If it's just some user-level method for some random stuff.
> All the things you are concerned with can be created using urls+views > so you shouldn't even need to worry about get_absolute_url. I don't worry, unless anyone will make (3rd party) module with get_absolute_url in one way and someone else to make another module with another usage of get_absolute_url. Unless some 3rd-party module creator will expect any specific behavior from other modules. Just get_absolute_url doesn't play well with django-plugin-federation. It takes also 3 pages in docs, that promote this bad method usage among the django beginners. Say, imagine django.contrib.comments will use get_absolute_url to promote current site and blog post, which has current comment, but not taking care that user needs content in his chosen language, not any fixed one, and that language is a part of an url. I.e. say you are rendering "last comments" block. This link shouldn't be neither rendered with Comment.get_absolute_url nor Post.get_absolute_url nor Site.get_absolute_url cause of i18n and multisite issues (let's imagine user is looking at german-language-flavoured version of the page): http://tag.blogsite.com/intl/de/2009/08/get-absolute-url-is-bad-practice/#comment241 (though see http://docs.djangoproject.com/en/dev/ref/settings/#absolute-url-overrides for this bad practice documented) P.S. yes, if comments were paginated, situation was even more dramatic! > I think you guys took it overboard with all the URL-class stuff. Like > the case for Yuri shows, once you start creating URL class you will > have to make all sorts of exceptions and additions for stuff that > people need. -- Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov, MSN: bu...@live.com --~--~---------~--~----~------------~-------~--~----~ 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 django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---