Opened 13 years ago
Closed 12 years ago
#18862 closed Cleanup/optimization (fixed)
FlatPages get_absolute_url should pay attention to script prefix
Description ¶
When hosting a django app under a subpath of a domain, then get_absolute_url returns the url without the subpath.
def get_absolute_url(self): return self.url
Better would be if the subpath is recognized
def get_absolute_url(self): absolute_url = "%s%s" % (get_script_prefix().rstrip('/'), self.url) return absolute_url
Change History (4)
comment:1 by , 13 years ago
Component: | Uncategorized → contrib.flatpages |
---|
comment:2 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 12 years ago
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Yes, this is necessary because flatpages bypass the URL resolver (and specifically the
reverse
function) entirely.