Просмотр исходного кода

Drop create_migration.py helper

The helper set up the environment for tests and then created the
migration. This can lead to subtle bugs if the test environment is
overriding models etc.

The helper is dropped to make creating migrations more explicit.
master
Maik Hoepfel 12 лет назад
Родитель
Сommit
ee3ee02aeb
1 измененных файлов: 0 добавлений и 29 удалений
  1. 0
    29
      create_migration.py

+ 0
- 29
create_migration.py Просмотреть файл

@@ -1,29 +0,0 @@
1
-#!/usr/bin/env python
2
-"""
3
-Convenience script to create migrations
4
-"""
5
-from optparse import OptionParser
6
-
7
-from tests.config import configure
8
-configure()
9
-
10
-
11
-def create_migration(app_label, **kwargs):
12
-    from south.management.commands.schemamigration import Command
13
-    com = Command()
14
-    com.handle(app=app_label, **kwargs)
15
-
16
-
17
-if __name__ == '__main__':
18
-    parser = OptionParser()
19
-    parser.add_option('-i', '--initial', dest='initial',
20
-                      action='store_true', default=False)
21
-    parser.add_option('-a', '--auto', dest='auto',
22
-                      action='store_true', default=False)
23
-    parser.add_option('-e', '--empty', dest='empty',
24
-                      action='store_true', default=False)
25
-    parser.add_option('-n', '--name', dest='name', default='')
26
-    (options, args) = parser.parse_args()
27
-    create_migration(args[0], initial=options.initial,
28
-                     auto=options.auto, empty=options.empty,
29
-                     name=options.name)

Загрузка…
Отмена
Сохранить