#18277: Startproject/app template documentation confusing
-------------------------------------+-------------------------------------
     Reporter:  sam@…                |                    Owner:  quinode
         Type:  New feature          |                   Status:  assigned
    Component:  Core (Management     |                  Version:  1.4
  commands)                          |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  startproject         |  Unreviewed
  startapp template                  |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by quinode):

 * status:  new => assigned
 * cc: dguardiola@… (added)
 * needs_better_patch:   => 0
 * component:  Documentation => Core (Management commands)
 * needs_tests:   => 0
 * owner:  nobody => quinode
 * needs_docs:   => 0
 * has_patch:  0 => 1


Comment:

 Indeed, the doc promise things that aren't happening in the code...

 I've exchanged by email with sam, and another common proposal is just to
 have a command parameter that would accept additional template variables.
 That's what the attached patch does, with a --add_context parameter
 The proposed syntax (documented in the help of the command) is :

 {{{
 django-admin.py startproject --template=templ/folder/
 --add_context=foo:bar,key:value mynewproject

 # or abbreviated form

 django-admin.py startproject --template=templ/folder/ -a foo:bar,key:value
 mynewproject
 }}}

 The string is parsed and key:values added to the template dict.

 Also added the documention modification

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18277#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to