Opened 8 years ago

Closed 7 years ago

Last modified 5 years ago

#8639 closed (fixed)

startproject is disabled if a settings module is specified

Reported by: whiskybar Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: django-admin
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I believe the documentation to django-admin.py should say the command startproject will be disabled if a settings module has been specified on the command-line or $DJANGO_SETTINGS_MODULE has been set. I have spent hours browsing docs, tickets, googlegroups, and irc to see where the command startproject has gone and why no one actually complains.

Finally, I came across a very well hidden documentation string at get_commands() in django/core/management/init.py which explained the problem to me.

Attachments (1)

django-admin.diff (410 bytes) - added by whiskybar 8 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by whiskybar

Attachment: django-admin.diff added

comment:1 Changed 8 years ago by Russell Keith-Magee

Resolution: duplicate
Status: newclosed

Duplicate of #8329.

comment:2 Changed 8 years ago by Karen Tracey

#8329 looks to be geared toward making the error message more explanatory. Given that it has been moved to post-1.0, would it make sense to reopen this & get the little doc fix suggested here into 1.0? I think #8666 is another using tripping over this.

comment:3 Changed 8 years ago by Malcolm Tredinnick

milestone: 1.0

Yes, we have to do something here. I got bitten by this the other day, too, and had a momentary "huh?!" moment.

comment:4 Changed 8 years ago by Malcolm Tredinnick

Resolution: duplicate
Status: closedreopened

comment:5 Changed 8 years ago by James Bennett

Resolution: fixed
Status: reopenedclosed

(In [8740]) Fixed #8639; documented the fact that the "startproject" command is invalid when fed an existing project's settings

comment:6 Changed 7 years ago by anonymous

Resolution: fixed
Status: closedreopened

I don't consider this fixed. Why can't it have a statement when I try to use the command that I have that shows which app is already in context to let me know, instead "unknown command." It's not an unknown command, it's all over the docs. It's a command that's disabled because an existing app's settings are being used and the command line response should point that out including indicating what that current project's name is.

comment:7 Changed 7 years ago by Russell Keith-Magee

Resolution: fixed
Status: reopenedclosed

This *was* fixed to the satisfaction of the core team in [8740]. Please don't reopen tickets that have been closed by the core. If you disagree with a decision that has been made, ask on django-dev.

comment:8 in reply to:  6 Changed 6 years ago by msabramo

Replying to anonymous:

I don't consider this fixed. Why can't it have a statement when I try to use the command that I have that shows which app is already in context to let me know, instead "unknown command."
It's not an unknown command, it's all over the docs. It's a command that's disabled because an existing app's settings are being used
and the command line response should point that out including indicating what that current project's name is.

I agree that there should be a warning. Note that there are two different patches that address this (one is mine) in #8329.

comment:9 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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