Skip to content

Instantly share code, notes, and snippets.

@NotSqrt
Forked from nealtodd/settings_test_snippet.py
Last active May 1, 2022 01:34
Show Gist options
  • Star 74 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save NotSqrt/5f3c76cd15e40ef62d09 to your computer and use it in GitHub Desktop.
Save NotSqrt/5f3c76cd15e40ef62d09 to your computer and use it in GitHub Desktop.
Another shot at this problem ..
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
@davidkell
Copy link

davidkell commented Jul 26, 2021

This is available in Django 3.1 onwards as a setting https://docs.djangoproject.com/en/3.1/ref/settings/#migrate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment