Opened 13 years ago
Closed 13 years ago
#16755 closed Bug (duplicate)
syncdb confuses any app named auth with its own
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I created an app called 'auth' which included some very, very simple auth type stuff. I have the django.contrib.auth removed from my INSTALLED_APPS since I do not need it. However, upon running syncdb, all of the django.contrib.auth tables are created even though they are not needed:
Creating table auth_permission Creating table auth_group_permissions Creating table auth_group Creating table auth_user_user_permissions Creating table auth_user_groups Creating table auth_user Creating table auth_message
The work around for this is to rename the app. Once I renamed it to 'site_auth', these tables were no longer created during syncdb.
Change History (4)
comment:1 by , 13 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
Resolution: | needsinfo |
---|---|
Status: | closed → reopened |
That would make sense if changing the name of the app didn't fix the problem. I have disabled all apps in my settings.py file except for my site_auth app.
It is not difficult to reproduce this problem and I have done it from a fresh project with django 1.3.
- Run: django-admin.py startproject temp
- Edit settings.py and comment out all apps under INSTALLED_APPS and all MIDDLEWARE_CLASSES
- Run: ./manage.py startapp auth
- Edit settings.py and add 'temp.auth', under INSTALLED_APPS
- Run: ./manage.py syncdb
- Notice the django.contrib.auth tables have been created.
- Remove tables/database to start over
- Rename auth project to s_auth (or anything other than just 'auth')
- Edit settings.py and change INSTALLED_APPS to reflect this change
- Run: ./manage.py syncdb
- Notice that the django.contrib.auth tables are not created this time.
comment:3 by , 13 years ago
Description: | modified (diff) |
---|
This could be another manifestation of #16283. It reported similar undesired side effects thad had been introduced in r14563 (part of the 1.3 development cycle). That change got reverted in r16481 for the 1.3.X post-1.3 fixes-only SVN branch.
Please if you can test again with a fresh checkout of the 1.3.X branch.
comment:4 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Indeed, this looks exactly like the problem described in #16283.
I'm going to close the ticket, but please reopen if it's a different issue.
It's entirely possible that this is happening; however, all the causes that I can think of stem from some level of user error. The most likely cause would be that something else in your stack is importing Django's auth app -- the admin would be the most likely candidate, but there are other possibilities.
Therefore, I'm going to mark this as needsinfo because there isn't enough information to reproduce the problem reliably.