#18164 closed Cleanup/optimization (fixed)
startapp error: no such option
Description ¶
In documentation (https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-option---template):
...
The template context used is:
- Any option passed to the startapp command
...
I run:
$ python manage.py startapp --import=datetime --template=/app_template.zip 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
manage.py: error: no such option: --import
Change History (3)
comment:1 by , 13 years ago
Component: | Core (Management commands) → Documentation |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.