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:
http://example.com:8888/admin/r/22/15/
However, when I click on that link (or enter that link into my browser) I get redirected to:
http://example.com:8888//example.com:8888/video/15
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
sites
which 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)])