Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dex4er/django-migrations-ignore-attrs
Do not generate unnecessary migrations
https://github.com/dex4er/django-migrations-ignore-attrs
Last synced: about 2 months ago
JSON representation
Do not generate unnecessary migrations
- Host: GitHub
- URL: https://github.com/dex4er/django-migrations-ignore-attrs
- Owner: dex4er
- License: lgpl-3.0
- Created: 2019-04-12T19:22:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T10:38:24.000Z (almost 3 years ago)
- Last Synced: 2024-08-10T11:48:34.979Z (5 months ago)
- Language: Python
- Size: 23.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
.. image:: https://img.shields.io/pypi/v/django-migrations-ignore-attrs.svg
:target: https://pypi.python.org/pypi/django-migrations-ignore-attrs
.. image:: https://travis-ci.org/dex4er/django-migrations-ignore-attrs.svg?branch=master
:target: https://travis-ci.org/dex4er/django-migrations-ignore-attrs
.. image:: https://readthedocs.org/projects/django-migrations-ignore-attrs/badge/?version=latest
:target: http://django-migrations-ignore-attrs.readthedocs.org/en/latest/
.. image:: https://img.shields.io/pypi/pyversions/django-migrations-ignore-attrs.svg
:target: https://www.python.org/
.. image:: https://img.shields.io/pypi/djversions/django-migrations-ignore-attrs.svg
:target: https://www.djangoproject.com/django-migrations-ignore-attrs
==============================django-migrations-ignore-attrs is a package that overrides ``makemigration``
and ``migrate`` commands for Django's ``manage.py`` command.django-migrations-ignore-attrs allows to avoid making of unnecessary migrations
for attributes that do not have any representation in database schema.Following attributes of model are ignored:
* verbose_name
* verbose_name_pluralFollowing attributes of standard fields are ignored:
* choices
* help_text
* verbose_nameFollowing attributes of ``ForeignKey`` are ignored:
* related_name
* related_query_nameInstallation
------------Install with ``pip`` or ``pipenv``:
.. code:: python
pip install django-migrations-ignore-attrs
Add ``django_migrations_ignore_attrs`` to your installed apps in your
settings.py file:.. code:: python
INSTALLED_APPS = [
'django_migrations_ignore_attrs',
...
]Optional configuration:
.. code:: python
# ignored attributes of model
MIGRATION_IGNORE_MODEL_ATTRS = ['verbose_name', 'verbose_name_plural']# ignored attributes of standard fields
MIGRATION_IGNORE_FIELD_ATTRS = ['choices', 'help_text', 'verbose_name']# ignored attributes of ForeignKey
MIGRATION_IGNORE_RELATED_FIELD_ATTRS = ['related_name', 'related_query_name']Commands
--------makemigrations
^^^^^^^^^^^^^^Creates new migration(s) for apps.
All options are the same as for original ``makemigrations`` command from
``django`` app.migrate
^^^^^^^Updates database schema. Manages both apps with migrations and those without.
All options are the same as for original ``migrate`` command from ``django``
app.Documentation
-------------See http://django-migrations-ignore-attrs.readthedocs.org/
License
-------Copyright © 2019, Piotr Roszatycki
This software is distributed under the GNU Lesser General Public License (LGPL
3 or greater).