Opened 12 years ago

Closed 11 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


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 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:

from siteadmin import my_site
urlpatterns = patterns('',
   (r'^admin/(.*)/', my_site.root),


Attachments (1) (3.8 KB) - added by elwaywitvac 12 years ago.
a demo project of the bug in ticket #9155

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by elwaywitvac

Attachment: added

a demo project of the bug in ticket #9155

comment:1 Changed 12 years ago by Marc Garcia

Component: Translationsdjango.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 Changed 11 years ago by Jacob

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top