Skip to content

Commit

Permalink
Extra doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
illagrenan committed Apr 27, 2016
1 parent 238eda8 commit c767a6a
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Django Make App: *generate Django app from YAML*
:alt: TravisCI

.. image:: https://coveralls.io/repos/github/illagrenan/django-make-app/badge.svg?branch=master
:target: https://coveralls.io/github/illagrenan/django-make-app?branch=master
:target: https://coveralls.io/github/illagrenan/django-make-app?branch=master
:alt: Coverage

.. image:: https://requires.io/github/illagrenan/django-make-app/requirements.svg?branch=master
Expand All @@ -22,7 +22,7 @@ Django Make App: *generate Django app from YAML*
Installation
------------

This package is not yet on PyPI. Supported Python versions are: ``2.7``, ``3.3``, ``3.4`` and ``3.5``.
This package is not yet on PyPI. Supported Python versions are: ``2.7``, ``3.3``, ``3.4``, ``3.5`` and ``pypy``.

.. code:: shell
Expand All @@ -31,26 +31,41 @@ This package is not yet on PyPI. Supported Python versions are: ``2.7``, ``3.3``
Usage
-----

If you want generate app ``library``, create ``library.yaml`` in project root.
If you want to generate app called ``library``, create a file ``library.yaml`` in project's root and define models:

.. code:: yaml
app_name: library
app_name: library # all files will be generated into library/ directory (will be created)
models:
- User:
- name:char
- email:char
- Book:
- library:fk
- Library
- User: # model name
- name:char # model field "name" of type "char"
- email:char # model field "email" of type "char"
- Book: # another model
- library:fk # model field "library" of type "foreign key" to "library"
- Library # empty model without fields
You can also print example configuration by:

.. code:: shell
django-make-app write_config
Now execute:

.. code:: shell
django-make-app generate library
This structure will be created for you:
Or run this if you need help:

.. code:: shell
django-make-app --help
django-make-app generate --help
django-make-app write_config --help
This structure will be generated:

.. code::
Expand Down

0 comments on commit c767a6a

Please sign in to comment.