I have a get_absolute_url() method on the object, but it doesn't
appear in the template, and the admin throws the error in the subject
line if I try to follow the "view on site" link.

Here's a sample model:

class Thing(models.Model):
     subject = models.CharField(maxlength=10)
     slug = models.SlugField(unique=True)

     def get_absolute_url(self):
          return '/thing/%s/%s/' % (self.subject, self.slug)

The "view on site" link points to '/admin/r/1/7/' (not the abs url!),
and my anchor tag is empty (<a href="">), even thought I
reference {{ object.get_absolute_url }} as the link. Help!


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to