Passing template_context vars to the starproject command

33 views
Skip to first unread message

Dominique Guardiola Falco

unread,
May 5, 2012, 7:48:28 AM5/5/12
to django...@googlegroups.com
I have a working project template that I can use with the new "--template" option of the startproject management command

Now Iwanted to pass more variables in the template_context, and the doc [1] says  :

The template context used is:
  • Any option passed to the startproject command
  • project_name -- the project name as passed to the command
  • project_directory -- the full path of the newly created project
  • secret_key -- a random key for the SECRET_KEY setting

My question is : what is the command line syntax to pass these options ?

when I type for example  :

django-admin.py startproject --template=/home/admin/tmpl/ --myvar="hey" a-new-project

I get : django-admin.py: error: no such option: --myvar

Dominique Guardiola
http://www.quinode.fr/


[1] https://docs.djangoproject.com/en/1.4/ref/django-admin/#django-admin-startproject

manikos

unread,
May 9, 2017, 7:44:20 AM5/9/17
to Django users
Did you find a solution to that?

dom

unread,
Jun 27, 2017, 12:13:44 PM6/27/17
to django...@googlegroups.com
Hi Nikos

This is VERY far…but…
I think we ended up making our own startproject command
see an example here :

hope this helps
Cheers 
Dom


--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/oBHbXRMkZRY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/aec83857-47fc-4131-9623-458fd39b8b06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages