Opened 16 years ago

Closed 15 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)

adminsitebug.zip (3.8 KB ) - added by elwaywitvac 16 years ago.
a demo project of the bug in ticket #9155

Download all attachments as: .zip

Change History (3)

by elwaywitvac, 16 years ago

Attachment: adminsitebug.zip added

a demo project of the bug in ticket #9155

comment:1 by Marc Garcia, 16 years ago

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 by Jacob, 15 years ago

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