Classy Django Forms is an API inspector of classes available in Django forms module. It exposes all public classes with their attributes, properties, methods and the dependencies to other classes. This project is heavily based on Classy Class-Based Views and Classy Django Rest Framework.
Requires Python 3.
$ virtualenv venv && source venv/bin/activate
$ pip install -r requirements.txt
$ make build
To run locally:
$ make runserver
This project generates a static website (see public
folder). This is achieved using 2 scripts:
src/generate_index.py
- pulls all the public classses from Django forms module and saved them as a JSON file (see klasses.json
)src/compile_static.py
- gets the data from the JSON file and renders pages with all the class infoThese 2 scripts are called for each tox environment. Tox is used to create multiple virtual environments each with a different version of Django.
Tip: during development if you don't want to build the static files for all versions of Django, you can run tox -e dj19
to generate the index and tox -e djbuild19
to compile static files only for Django 1.9.
cdf/config.py
and tox.ini
like this.make build_local
.public/
and a new key in .klasses.json
with the added Django version.The website is hosted by GitHub Pages on a custom domain https://cdf.9vo.lt.
To deploy a new version, do the following:
git checkout gh-pages && git merge master
.make build
.git add public/ && git commit
.git subtree push --prefix public/ origin gh-pages
. This will push only the public folder to gh-pages.Author: ana-balica
Source: https://github.com/ana-balica/classy-django-forms
License: MIT license