Browse Source

Updated the django listfieldtype command (useless since we planned to remove django -_-) + disabling the LodelTestInstance calls to djangoMh

Yann Weber 9 years ago
parent
commit
c0bea01d0e

+ 2
- 0
EditorialModel/migrationhandler/django.py View File

@@ -13,6 +13,8 @@ from EditorialModel.classtypes import EmNature
13 13
 
14 14
 from EditorialModel.exceptions import *
15 15
 
16
+## @package EditorialModel::migrationhandler::django
17
+# @deprecated Broken since EmField and fieldtypes changed
16 18
 
17 19
 ## @brief Create a django model
18 20
 # @param name str : The django model name

+ 3
- 3
Lodel/management/commands/listfieldtypes.py View File

@@ -1,6 +1,6 @@
1 1
 from django.core.management.base import BaseCommand, CommandError
2 2
 from optparse import make_option
3
-from EditorialModel.fields import EmField
3
+import EditorialModel
4 4
 
5 5
 class Command(BaseCommand):
6 6
     option_list = BaseCommand.option_list + (
@@ -13,7 +13,7 @@ class Command(BaseCommand):
13 13
     help = 'List all the possible field types'
14 14
 
15 15
     def handle(self, *args, **options):
16
-        ftl = EmField.fieldtypes_list()
16
+        ftl = EditorialModel.fields.EmField.fieldtypes_list()
17 17
         ftl.sort()
18 18
         if options['silent']:
19 19
             for ftype in ftl:
@@ -21,4 +21,4 @@ class Command(BaseCommand):
21 21
         else:
22 22
             self.stdout.write("Field types list : ")
23 23
             for ftype in ftl:
24
-                self.stdout.write("\t{0:15} {1}".format(ftype, EmField.get_field_class(ftype).help))
24
+                self.stdout.write("\t{0:15} {1}".format(ftype, EditorialModel.fieldtypes.generic.GenericFieldType.from_name(ftype).help))

+ 2
- 2
LodelTestInstance/models.py View File

@@ -6,12 +6,12 @@ from EditorialModel.migrationhandler.dummy import DummyMigrationHandler
6 6
 from EditorialModel.model import Model
7 7
 from EditorialModel.backend.json_backend import EmBackendJson
8 8
 
9
-
9
+""" #Commented because django Mh is broken
10 10
 if not settings.LODEL_MIGRATION_HANDLER_TESTS:
11 11
     me = Model(EmBackendJson('EditorialModel/test/me.json'), migration_handler = DummyMigrationHandler(True))
12 12
     dmh = DjangoMigrationHandler('LodelTestInstance', settings.DEBUG)
13 13
     models = dmh.em_to_models(me)
14 14
 elif settings.DEBUG:
15 15
     print("Making migrations tests, don't generate the models in the models.py file but within the migrations handler check process")
16
-
16
+"""
17 17
 

Loading…
Cancel
Save