File: create_app.rst

package info (click to toggle)
python-django-extensions 0.4.2pre%2Bgit201004211325-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 768 kB
  • ctags: 739
  • sloc: python: 4,197; makefile: 76
file content (41 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
create_app
==========

:synopsis: Creates an application directory structure for the specified application name.

This command allows you to specify the --template option where you can indicate
a template directory structure to use as your default.

The --diagram option generates the models.py and admin.py from a .dia file.


Example Usage
-------------

All examples assume your current directory is the project directory and
settings.py is under it.

::

  # Get command help
  ./manage.py create_app --help

::

  # Generate models.py and admin.py from [APP_NAME].dia file. This file should
  # be placed in the settings.py directory.
  ./manage.py create_app -d APP_NAME


Example generated from sample.dia
---------------------------------

::

  ./manage.py create_app --diagram=sample.dia webdata

-d switch or --diagram option use dia2django_ to generate models.py and is
better documented in `django wiki`_.

.. _dia2django: https://svn.devnull.li/main/pythonware/dia2django/trunk/doc/
.. _`django wiki`: http://code.djangoproject.com/wiki/Dia2Django