Create models definitions document from your Django project.
Project description
Create models definitions document from your django project. This project help the documentation related to Django models.
Quick start
Add “modelsdoc” to your INSTALLED_APPS setting like this
INSTALLED_APPS = ( ... 'modelsdoc', )
Run python manage.py listing_models to listing model definition
You can see the results of executing the command to tests/models.py.
Option
–app(-a)
You can pass specify app name. Listing only the specified app.
$ python manage.py listing_models --app polls
–output(-o)
It writes the results to the specified file.
$ python manage.py listing_models --output sample.rst
–format(-f)
You can choice output format. rst (reStructuredText) or md (Markdown). Default format is rst.
$ python manage.py listing_models --format md
Customize Settings
MODELSDOC_APPS
You can specify the apps and change the order.
# output only models of poll MODELSDOC_APPS = (polls,)
MODELSDOC_DISPLAY_FIELDS
You can specify the field value and change the order.
MODELSDOC_DISPLAY_FIELDS = ( ('Fullname', 'verbose_name'), ('Name', 'name'), ('Type', 'db_type'), ('PK', 'primary_key'), ('Unique', 'unique'), ('Index', 'db_index'), ('Null/Blank', 'null_blank'), ('Comment', 'comment'), )
MODELSDOC_MODEL_OPTIONS
# TODO more documented
MODELSDOC_MODEL_OPTIONS = ( 'unique_together', 'index_together', 'ordering', 'permissions', 'get_latest_by', 'order_with_respect_to', 'db_tablespace', 'abstract', 'swappable', 'select_on_save', 'default_permissions', 'default_related_name' )
Other settings
# TODO more documented
MODELSDOC_OUTPUT_TEMPLATE = 'modelsdoc/models' MODELSDOC_OUTPUT_FORMAT = 'rst' # default format MODELSDOC_MODEL_WRAPPER = 'modelsdoc.wrappers.ModelWrapper' MODELSDOC_FIELD_WRAPPER = 'modelsdoc.wrappers.FieldWrapper' MODELSDOC_INCLUDE_AUTO_CREATED = True
Python and Django Support
Django.1.5 |
Django1.6 |
Django1.7 |
Django1.8 |
Django1.9 |
Django1.10 |
Django1.11 |
Django2.0 |
|
Python 2.7 |
◯ |
◯ |
◯ |
◯ |
◯ |
◯ |
◯ |
|
PyPy |
◯ |
◯ |
◯ |
◯ |
◯ |
◯ |
◯ |
|
Python 3.3 |
◯ |
◯ |
||||||
Python 3.4 |
◯ |
◯ |
◯ |
◯ |
◯ |
◯ |
||
Python 3.5 |
◯ |
◯ |
◯ |
◯ |
◯ |
|||
Python 3.6 |
◯ |
◯ |
◯ |
◯ |
◯ |
License
MIT Licence. See the LICENSE file for specific terms.
History
0.1.11(Nov 28, 2019)
Add models.yaml template file.
0.1.10(Nov 28, 2019)
Add Support YAML format.
0.1.9(Feb 8, 2018)
Fix Set section length dynamically. Thanks to wanshot
0.1.8(Dec 3, 2017)
Add Support Django2.0
0.1.7(May 29, 2017)
Add Support Django1.11 and Python 3.6
0.1.6(Nov 4, 2016)
Add Support Django1.10
0.1.5(May 4, 2016)
Add Support Python3.5 and Django1.9
0.1.4(Sep 23, 2015)
Fixed bug. When print models, linebreak is ignored.
Add ManyToManyField’s info on “listing_models” results.
0.1.3(Jul 19, 2015)
Fixed bug. install test code.
Add new option “MODELSDOC_INCLUDE_AUTO_CREATED”
0.1.2(Jun 21, 2015)
Bug fixed. Not include output templates.
0.1.0(Jun 21, 2015)
First release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-modelsdoc-0.1.11.tar.gz
.
File metadata
- Download URL: django-modelsdoc-0.1.11.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c290716198a35cab4f4519e55f81b77f76dbdcd49ce2aba4313af2e8fd8e308 |
|
MD5 | 2ebfb47942c17271db0a63d726bd46ff |
|
BLAKE2b-256 | 2826fc83b092e4b087f32a36ec9bdc7a02f262bfe9868cf04ebed3a49eae58e8 |
File details
Details for the file django_modelsdoc-0.1.11-py2.py3-none-any.whl
.
File metadata
- Download URL: django_modelsdoc-0.1.11-py2.py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21c5b56bfd480feb59e4d8c4d6dc5b3848a8cbd5877cd50b739d1ae4371f23d7 |
|
MD5 | 731f498881b9d0489b35ef46e29a6e58 |
|
BLAKE2b-256 | 3a5add0097a8e7cab4cc8382dfcc4ad0642e64dec90a56c3cb9e8fbe77a8b5b2 |