diff options
| author | Preston Holmes <preston@ptone.com> | 2012-11-15 21:17:58 -0800 |
|---|---|---|
| committer | Preston Holmes <preston@ptone.com> | 2012-11-21 22:06:59 -0800 |
| commit | d80d05fc673665fa614e65eb2c38b654ccf28235 (patch) | |
| tree | a23c2e5487bbbda0e48550db10c63fd02ff75f04 /docs/ref/django-admin.txt | |
| parent | 8e5573e99abd5351dfbd6de1214662ecf7f6c9ba (diff) | |
Added examples of using startproject/app with URLs
thanks to Brent O'Connor for the idea and intial docs
Diffstat (limited to 'docs/ref/django-admin.txt')
| -rw-r--r-- | docs/ref/django-admin.txt | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index a5ed37f25f..306db8439e 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -879,14 +879,19 @@ either the path to a directory with the app template file, or a path to a compressed file (``.tar.gz``, ``.tar.bz2``, ``.tgz``, ``.tbz``, ``.zip``) containing the app template files. +For example, this would look for an app template in the given directory when +creating the ``myapp`` app:: + + django-admin.py startapp --template=/Users/jezdez/Code/my_app_template myapp + Django will also accept URLs (``http``, ``https``, ``ftp``) to compressed archives with the app template files, downloading and extracting them on the fly. -For example, this would look for an app template in the given directory when -creating the ``myapp`` app:: +For example, taking advantage of Github's feature to expose repositories as +zip files, you can use a URL like:: - django-admin.py startapp --template=/Users/jezdez/Code/my_app_template myapp + django-admin.py startapp --template=https://github.com/githubuser/django-app-template/archive/master.zip myapp .. versionadded:: 1.4 @@ -954,6 +959,15 @@ when creating the ``myproject`` project:: django-admin.py startproject --template=/Users/jezdez/Code/my_project_template myproject +Django will also accept URLs (``http``, ``https``, ``ftp``) to compressed +archives with the project template files, downloading and extracting them on the +fly. + +For example, taking advantage of Github's feature to expose repositories as +zip files, you can use a URL like:: + + django-admin.py startproject --template=https://github.com/githubuser/django-project-template/archive/master.zip myproject + When Django copies the project template files, it also renders certain files through the template engine: the files whose extensions match the ``--extension`` option (``py`` by default) and the files whose names are passed |
