I am using the latest checkout of the django trunk - when I am in the admin on the "change" page for an object/item, there is a nice little link that says "view on site".
The link points to a url such as:
However, when I click on that link (or enter that link into my browser) I get redirected to:
Which isn't a valid url - but it's really, really close ... the same is happening when I try to
get_absolute_url for a comment. I get the short little redirect but it doesn't take me to the right page.
Any ideas why this is happening?
Additional Info (edit):
- have tried with 1.1.1 (same problem)
- I have one site listed under
siteswhich is 'http://example.com:8888'
I thought maybe it had to do with the port number at the end - but what is strange is the my object's
get_absolute_url works without a hitch.
I think the problem is coming from
django.contrib.contenttypes.views.shortcut which is doing some funny appending business to handle cross-site things ... which I don't quite understand.
get_absolute_url (for objects)
@models.permalink def get_absolute_url(self): return ('video_detail', [str(self.id)])
I figured it out: my site's 'domain name' was listed as:
But the 'http' is what is throwing it off. When I removed it and just listed it as:
It works. I just have to update my email templates to include the 'http', I think ... unless django comes with a built in for adding that in its
sites package. Off to investigate ...