Passing template_context vars to the starproject command

33 görüntüleme
İlk okunmamış mesaja atla

Dominique Guardiola Falco

okunmadı,
5 May 2012 07:48:285.05.2012
alıcı 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

okunmadı,
9 May 2017 07:44:209.05.2017
alıcı Django users
Did you find a solution to that?

dom

okunmadı,
27 Haz 2017 12:13:4427.06.2017
alıcı 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.

Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti