Define the get_absolute_url method in your model. E.g
class Entry(models.Model):
title = models.CharField(maxlength=200)
......
def get_absolute_url(self):
return "/entry/%s/" % (self.title)
Hope that helps.
On Nov 28, 12:12 pm, Dirk Eschler <[EMAIL PROTECTED]> wrote:
> Am Dienstag, 28. November 2006 18:03 schrieb conrad22:
>
> > How do I get the 'View on site' link that appears in the Django
> > interface to work?
> > I've tried adding the following to my urls.py
>
> > (r'^r/', include('django.conf.urls.shortcut')),
>
> > But didn't do anything!
>
> > Thanks!You have to activate the sites framework, resp. add
> > 'django.contrib.sites' to
> your INSTALLED_APPS, and then set your hostname in the admin interface. At
> least i had to...
>
> http://www.djangoproject.com/documentation/sites/
>
> Hope that helps,
> Dirk
>
> --
> Dirk Eschler <mailto:[EMAIL PROTECTED]>http://www.krusader.org
--~--~---------~--~----~------------~-------~--~----~
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]
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
-~----------~----~----~----~------~----~------~--~---