Преглед на файлове

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 години
родител
ревизия
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)

Loading…
Отказ
Запис