Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18164 closed Cleanup/optimization (fixed)

startapp error: no such option

Reported by: nikita@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In documentation (

The template context used is:

  • Any option passed to the startapp command


I run:

$ python startapp --import=datetime --template=/ new_app

I added a new option --import=datetime.
In my (py) template:

{% if import %}import {{ import }}{% endif %}

I expect to see in my py-file after executing the command:

import datetime

but I see in console error: no such option: --import

Change History (3)

comment:1 Changed 3 years ago by jezdez

  • Component changed from Core (Management commands) to Documentation
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization

To my surprise this documentation actually leads to confusion, it doesn't take arbitrary options, but those the management command understands. I agree the docs need to be fixed.

comment:2 Changed 3 years ago by Claude Paroz <claude@…>

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

In [249c445446f0811d6396cfd3053aed33edf2e7b3]:

Fixed #18164 -- Precised startapp template context content

comment:3 Changed 3 years ago by Claude Paroz <claude@…>

In [fd88fe657b42cf314bcd23bf79edf71c378520f4]:

[1.4.x] Fixed #18164 -- Precised startapp template context content

Backport of 249c445446 from master.

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