File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111# the test database instead of doing it through the migrations. Taken from
1212# https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09
1313
14- ## To be removed after upgrade to Django 1.8 ##
15-
1614class DisableMigrations (object ):
1715
1816 def __contains__ (self , item ):
1917 return True
2018
2119 def __getitem__ (self , item ):
22- # The string below is significant. It has to include the value of
23- # django.db.migrations.loader.MIGRATIONS_MODULE_NAME. Used by django
24- # 1.7 code in django.db.migrations.loader.MigrationLoader to
25- # determine whether or not to run migrations for a given module
26- from django .db .migrations .loader import MIGRATIONS_MODULE_NAME
27- return "no " + MIGRATIONS_MODULE_NAME
20+ return None
2821
2922MIGRATION_MODULES = DisableMigrations ()
3023
Original file line number Diff line number Diff line change 1515# the test database instead of doing it through the migrations. Taken from
1616# https://gist.github.com/NotSqrt/5f3c76cd15e40ef62d09
1717
18- ## To be removed after upgrade to Django 1.8 ##
19-
2018class DisableMigrations (object ):
2119
2220 def __contains__ (self , item ):
2321 return True
2422
2523 def __getitem__ (self , item ):
26- from django .db .migrations .loader import MIGRATIONS_MODULE_NAME
27- # The string below is significant. It has to include the value of
28- # django.db.migrations.loader.MIGRATIONS_MODULE_NAME. Used by django
29- # 1.7 code in django.db.migrations.loader.MigrationLoader to
30- # determine whether or not to run migrations for a given module.
31- # By returning a non-existent path, we ignore migrations.
32- return "no_" + MIGRATIONS_MODULE_NAME
24+ return None
3325
3426MIGRATION_MODULES = DisableMigrations ()
3527
28+
3629DATABASES = {
3730 'default' : {
3831 'NAME' : 'test.db' ,
You can’t perform that action at this time.
0 commit comments