Opened 16 years ago
Closed 16 years ago
#9155 closed (invalid)
Translations cause AdminSite and auth models trouble
Reported by: | elwaywitvac | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Keywords: | auth adminsite bug translations | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This is a horrifically specific bug, so I mostly post this as a warning.
IF you have a custom "siteadmin" application that registers an AdminSite within the _init_.py which imports the django.contrib.auth.admin AND is labeled in INSTALLED_APPS as 'project.app_name', you will not be able to run the server.
However, if it isn't within init or just installed as app_name you're fine. That was a fun hour...
I'm attaching a broken project, just try to run the test server.
Things of note:
# urls.py from siteadmin import my_site urlpatterns = patterns('', (r'^admin/(.*)/', my_site.root), ) # settings.py INSTALLED_APPS = ( 'adminsitebug.siteadmin'. 'django.contrib.admin', 'django.contrib.auth', ...
Attachments (1)
Change History (3)
by , 16 years ago
Attachment: | adminsitebug.zip added |
---|
comment:1 by , 16 years ago
Component: | Translations → django.contrib.admin |
---|
From my point of view, it's meaningless specifying the project name in the INSTALLED_APPS. The python path will include your project, so the application name is what you would import in your code.
Anyway I just change the component, so obviously it's not a translation related issue.
comment:2 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I don't see what the bug is here other than a simple misunderstanding of how PYTHONPATH
and import works. Please reopen -- and hit me with the cluestick -- if I'm wrong.
a demo project of the bug in ticket #9155