On Wed, 2006-05-17 at 16:47 -0500, James Bennett wrote:
> On 5/17/06, Paul Childs <[EMAIL PROTECTED]> wrote:
> > I'm still looking for the answer to question 2. Any help would be
> > appreciated.
> 
> This is something that really desperately needs to be documented
> somewhere obvious or, even better, commented out in the default
> urls.py like the admin URLConf is. The secret is to add this line in
> your project's URL configuration:
> 
> (r'^r/', include('django.conf.urls.shortcut')),
> 
> The reasons for this, so far as I know, are partly historical and
> partly to do with providing support for objects being published across
> multiple sites.

This behaviour was a wart in 0.91 (I realise that is what Paul is
using). In the development version, the link generated has been fixed so
that it now says /admin/r/... and the url configuration in the admin
module automatically has this.

The result is that -- in the latest code -- providing you define
get_absolute_url() in your model, you get "view on site" with no extra
work and no longer have to add something to your global urls.py.

"View on site" is pretty handy even in non-multiple-site set ups. If I
am fixing a record's entry, it is nice to get this shortcut to see the
edited version on the website. Nothing huge, just saves a couple of
mouse clicks and all for no effort.

Best wishes,
Malcolm


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

Reply via email to