Opened 13 years ago

Closed 12 years ago

Last modified 12 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

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 Jannis Leidel, 13 years ago

Component: Core (Management commands)Documentation
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/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 by Claude Paroz <claude@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [249c445446f0811d6396cfd3053aed33edf2e7b3]:

Fixed #18164 -- Precised startapp template context content

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

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