Skip to main content

A Django library to automatically format your migrations.

Project description

django-migrations-formatter

GitHub Workflow Status (branch) Codecov branch Version License Python Versions Django Versions

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

django-migrations-formatter-0.1.3.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-migrations-formatter-0.1.3.tar.gz.

File metadata

  • Download URL: django-migrations-formatter-0.1.3.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for django-migrations-formatter-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fcc39fced49d55f4624d219ae3ec8c89aed312a82af8669364684a6ed93490a3
MD5 6f34da089a339155474ae5b48f5db548
BLAKE2b-256 1abed877566a0d0897201aaf36f5e52aa4fa55df2f4e22023b845660c51e0d2f

See more details on using hashes here.

Provenance

File details

Details for the file django_migrations_formatter-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: django_migrations_formatter-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for django_migrations_formatter-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6517a448e83db4eff56b4125d2d13e92331f7590685f340b456e7372b3171ebb
MD5 2ed64f91ebd7e75a3b277b38ede23d9e
BLAKE2b-256 bc74fc931690770e0036b4bbf3b93ca61b3fd5fd06a3529fcde7210e1d2698ea

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page