Opened 7 years ago

Closed 6 years ago

Last modified 4 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 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by whiskybar

comment:1 Changed 7 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #8329.

comment:2 Changed 7 years ago by kmtracey

#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 7 years ago by mtredinnick

  • milestone set to 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 7 years ago by mtredinnick

  • Resolution duplicate deleted
  • Status changed from closed to reopened

comment:5 Changed 7 years ago by ubernostrum

  • Resolution set to fixed
  • Status changed from reopened to closed

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

comment:6 follow-up: Changed 6 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

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 5 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 4 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

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