A Django library to automatically format your migrations.
Project description
django-migrations-formatter
This Django library will format Django migrations using black and isort.
Installation
Start by installing django-migrations-formatter
from PyPI:
(env)$ python -m pip install django-migrations-formatter
You will also need to make sure to have black
and/or isort
installed.
Without them, this library doesn't provide any value.
Then you need to add django_migrations_formatter.apps.MigrationsFormatter
to
your INSTALLED_APPS
:
INSTALLED_APPS = [
...,
'django_migrations_formatter.apps.MigrationsFormatter',
]
Contributing
The project uses black and isort for formatting its code. flake8 is used for linting. All these are combined into pre-commit to run before each commit and push. To set it up:
(env)$ python -m pip install '.[dev,test]'
(env)$ pre-commit install -t pre-commit -t pre-push --install-hooks
To run the unit tests:
(env)$ django-admin.py test -v 2 --settings=tests.settings
If you spot an problem, please open an issue on GitHub.
Project details
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
Hashes for django-migrations-formatter-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f36c9a25293de6a813b01b4915ec1de4142845a02b6a0c49970145401f665d8 |
|
MD5 | 9ffc6fe18594cd05d24cd1609687055b |
|
BLAKE2b-256 | c74d448abcac5cb2974e2c42657e9d0c381a6f779c273c51f2567cc4baade24c |
Hashes for django_migrations_formatter-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47ba98dddfe5cb158e7beb91072f818dbfad7ffb3c57273cd433f50115d1dc6b |
|
MD5 | fceef7a0c8fdeb32d5d510f23c8b4f69 |
|
BLAKE2b-256 | 0418e1ad5705ab7c6d8197b915d9b1200753cedbdaac8527fdd85d30e3a2b9eb |