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

Django 1.1 Compatibility Admin URL patterns #154

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install django-page-cms in an existing project where urls.py calls admin 
urls by "('^admin/', include(admin.site.urls))," (See: 
http://docs.djangoproject.com/en/dev/releases/1.1/#features-deprecated-in-
1-1)
2. Log in to admin
3. Go to List of Pages "/admin/pages/page/"

What is the expected output? What do you see instead?
Should show list of pages, instead shows no pages. Pages can be added and 
accessed on public site, show in DB everywhere except admin list of pages, 
which comes up blank.

What version of the product are you using? On what operating system?
Django 1.1 stable

Please provide any additional information below.
I had opened this issue before, it was set to WontFix but now it is a major 
issue. The configuration used by django-page-cms "(r'^admin/(.*)', 
admin.site.root)" has been deprecated in Django 1.1 and has conflicts with 
new features.

I have just discovered that the reason it is deprecated is because if you 
try to modify the admin with the new feature ModelAdmin.get_urls() ( 
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admi
n.ModelAdmin.get_urls ) the custom admin URL patterns get overridden by 
admin.site.root.

This means that you can't utilize this new feature with django-page-cms 
installed. Many newer apps are already making use of this new feature so 
the issue needs to be patched asap.

Original issue reported on code.google.com by ronaldwh...@gmail.com on 22 Aug 2009 at 8:28

GoogleCodeExporter commented 9 years ago
Try that instead:

(r'^admin/', include(admin.site.urls)),

I have already done some work to migrate most of the stuff and deprecated the 
old 
way.

I have the latest version of Django here and all the tests pass (in fact one is 
not 
passing right now). Could you try with the new syntax?

Original comment by batiste....@gmail.com on 23 Aug 2009 at 10:54

GoogleCodeExporter commented 9 years ago
I just realized I had svn set to an earlier revision. Updated to latest and it 
appears 
to work. I guess just the documentation needs a change.

Unrelated but now I'm noticing something that changed between rev update is 
throwing an 
error. If its not on my end I'll let you know...

Thanks!

Original comment by ronaldwh...@gmail.com on 23 Aug 2009 at 10:43

GoogleCodeExporter commented 9 years ago
I consider this as fixed for now

Original comment by batiste....@gmail.com on 25 Aug 2009 at 7:01