The database option is not honored when `createsuperuser` is called by `syncdb`
|Reported by:||charettes||Owned by:||nobody|
|Severity:||Release blocker||Keywords:||syncdb createsuperuser database multidb|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
When calling the syncdb command with a database kwarg
./manage.py syncdb --database my_specific_db
The post_sync_db signal is dispatched correctly but the django.contrib.auth.management.create_superuser receiver doesn't take the db kwarg into account when calling createsuperuser thus it attempts to create it on the default database. It should call the command on the database specified in syncdb.
I'm attaching a patch but I really don't know where I should add tests for this, I can't find where syncdb is tested. Is it??
Change History (4)
Changed 2 years ago by charettes
comment:1 Changed 2 years ago by julien
- Needs documentation unset
- Needs tests set
- Patch needs improvement unset
- Severity changed from Normal to Release blocker