1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #17042 -- Extended startproject and startapp management commands to better handle custom app and project templates. Many thanks to Preston Holmes for his initial patch and Alex Gaynor, Carl Meyer, Donald Stufft, Jacob Kaplan-Moss and Julien Phalip for code reviewing.

* Added ability to pass the project or app directory path as the second argument
* Added ``--template`` option for specifying custom project and app templates
* Cleaned up admin_scripts tests a little while I was there

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2011-12-22 22:38:02 +00:00
parent 98c974c70b
commit a9a0f0b03f
29 changed files with 996 additions and 266 deletions

View File

@@ -420,6 +420,27 @@ callable :djadmin:`runserver` uses.
(The :djadmin:`runfcgi` management command also internally wraps the WSGI
callable configured via :setting:`WSGI_APPLICATION`.)
Custom project and app templates
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The :djadmin:`startapp` and :djadmin:`startproject` management commands
got a ``--template`` option for specifying paths or URL to custom app or
project templates.
For example, Django will use the ``/path/to/my_project_template``
directorywhen running the following command::
django-admin.py startproject --template=/path/to/my_project_template myproject
Additionally you can now provide a destination directory as the second
argument to both :djadmin:`startapp` and :djadmin:`startproject`::
django-admin.py startapp myapp /path/to/new/app
django-admin.py startproject myproject /path/to/new/project
For more information see the :djadmin:`startapp` and :djadmin:`startproject`
documentation.
Support for time zones
~~~~~~~~~~~~~~~~~~~~~~