google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

broken links on change list page when admin site url is something other than '/admin' #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure admin site url to be something other than '/admin', for
example: '/backdoor'
2. Add a cms page using the admin site
3. Go to the list of cms pages in the admin site. All the links to edit a
page are broken.

Normally the admin site would be at http://mysite/admin , however some
users may wish to use a different url by configuring the site urls with a
rule like this:

(r'^backdoor/(.*)', admin.site.root)

When configured like this, the list of cms pages is at
http://mysite/backdoor/pages/page/ , but all the links to edit cms pages
are broken.  The links are http://mysite/admin/pages/page/34 instead of
http://mysite/backdoor/pages/page/34

The fix:

In
http://django-page-cms.googlecode.com/svn/trunk/pages/templates/admin/pages/page
/change_list_table.html

change:

{% for page in pages %}
    {% pages_admin_menu page %}
{% endfor %}

to this:

{% for page in pages %}
    {% pages_admin_menu page request.path %}
{% endfor %}

Original issue reported on code.google.com by meye...@gmail.com on 10 Apr 2009 at 6:13

GoogleCodeExporter commented 9 years ago
I have fixed this problem, and also another one related to the javascript.

Original comment by batiste....@gmail.com on 13 Apr 2009 at 3:16