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.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.10.tar.gz
.
File metadata
- Download URL: django-modelsdoc-0.1.10.tar.gz
- Upload date:
- Size: 16.8 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 | fb4e8eed6787c726a9c624cce5e491253670d6f04c749981affd1de1af4803b8 |
|
MD5 | e515abf3b0a49215e1bc4df488cac5cf |
|
BLAKE2b-256 | f50941cdfcd804c970c3f1482f02e7e8202a386ed427219c0248a97c5e02b26b |
File details
Details for the file django_modelsdoc-0.1.10-py2.py3-none-any.whl
.
File metadata
- Download URL: django_modelsdoc-0.1.10-py2.py3-none-any.whl
- Upload date:
- Size: 11.9 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 | 9df624393268135f728d6016db94f1b023c02d581658dfa9b6547c23494e3ddc |
|
MD5 | 6bcab80cfc475be60e413ece881a1898 |
|
BLAKE2b-256 | f7393c198ce63a6439fa2cdd4780df673c95c4c91f1212b6f5c3d4650b61e8bf |