Hi all,

I'm very much concerned about using get_absolute_url and its substitutes at all.

This approach makes harder to keep apps modular, extensible and
reusable of apps.

1) You make a hypothesis that each object instance has a single point
of reverse and a default output format, giving you only one fixed url
for object. What about i18n? Different output formats?
2) You want to make model instances to know their own url, that's
misleading. Why one needs urlconf then?
3) Cause you can't easily override model method get_absolute_url, you
introduce ABSOLUTE_URL_OVERRIDES hook.

And you now want that model instances to know the site they are displayed on?!
What about same object displayed on multiple sites & internationalized urls?

On Thu, Sep 10, 2009 at 10:23 PM, drozzy <dro...@gmail.com> wrote:
>
> Just read the "Replacing get_absolute_url proposal":
> http://code.djangoproject.com/wiki/ReplacingGetAbsoluteUrl
>
> and personally I think adding two functions get_url_path and get_url
> is a lot more confusing. One can never remember which one gets the
> Absolute url and which one gets the Relative url.
>
> If it is going to be done I propose adding another function, and thus
> have two possible functions on the model:
> get_relative_url
> get_absolute_url
>
> However I am not sure how that will tie into the Permalink decorator:
> http://docs.djangoproject.com/en/dev/ref/models/instances/#the-permalink-decorator
>
> >
>



-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to