- Author:
- denisviklov
- Posted:
- September 15, 2015
- Language:
- Python
- Version:
- 1.7
- Score:
- 0 (after 0 ratings)
Useful snippet for everyone who wants turn off django 1.7 migrations for example for unittesting or who wants create database with "syncdb" command.
1 2 3 4 5 6 7 8 9 10 11 | #drop in your settings.py
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
|
More like this
- Image compression before saving the new model / work with JPG, PNG by Schleidens 5 days, 5 hours ago
- Help text hyperlinks by sa2812 1 month ago
- Stuff by NixonDash 3 months, 1 week ago
- Add custom fields to the built-in Group model by jmoppel 5 months, 1 week ago
- Month / Year SelectDateWidget based on django SelectDateWidget by pierreben 8 months, 3 weeks ago
Comments
Please login first before commenting.