[patch] django-admin.py inspectdb shouldn't require dbname
|Reported by:||pb@…||Owned by:||adrian|
|Component:||Core (Management commands)||Version:||magic-removal|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently the "inspectdb" command requires a dbname argument, while still using the backend type, username, and password defined in DJANGO_SETTINGS_MODULE. It might as well pull the dbname from there too. Allowing the dbname as a command-line parameter has the potential to create confusion by obscuring the dependency on settings.py and doesn't really save the user any work in most cases.
(I can imagine some cases where the current behavior would be handy -- SQLite, or multiple DBs that happen to share access -- but I think in most cases the user will need to edit settings.py before running inspectdb anyway.)
Attached is a patch that removes the required argument.
I'm setting this ticket's version to magic-removal since that's the branch my patch is on.
Change History (5)
Changed 9 years ago by pb@…
comment:3 Changed 9 years ago by pb@…
- Severity changed from normal to minor
- Summary changed from django-admin.py inspectdb shouldn't require dbname to [patch] django-admin.py inspectdb shouldn't require dbname