|
@@ -1,7 +1,5 @@
|
1
|
1
|
# -*- coding: utf-8 -*-
|
2
|
2
|
|
3
|
|
-#from django.conf import settings
|
4
|
|
-#settings.configure(DEBUG=True)
|
5
|
3
|
import os
|
6
|
4
|
import sys
|
7
|
5
|
|
|
@@ -12,7 +10,6 @@ from django.core.exceptions import ValidationError
|
12
|
10
|
|
13
|
11
|
from EditorialModel.exceptions import *
|
14
|
12
|
|
15
|
|
-#django.conf.settings.configure(DEBUG=True)
|
16
|
13
|
|
17
|
14
|
|
18
|
15
|
## @brief Create a django model
|
|
@@ -24,7 +21,7 @@ from EditorialModel.exceptions import *
|
24
|
21
|
# @param admin_opts dict : Dict of options for admin part of this model
|
25
|
22
|
# @param parent_class str : Parent class name
|
26
|
23
|
# @return A dynamically created django model
|
27
|
|
-# @source https://code.djangoproject.com/wiki/DynamicModels
|
|
24
|
+# @note Source : https://code.djangoproject.com/wiki/DynamicModels
|
28
|
25
|
#
|
29
|
26
|
def create_model(name, fields=None, app_label='', module='', options=None, admin_opts=None, parent_class=None):
|
30
|
27
|
class Meta:
|
|
@@ -337,7 +334,7 @@ class DjangoMigrationHandler(object):
|
337
|
334
|
kwargs['through'] = through_model_name
|
338
|
335
|
|
339
|
336
|
return models.ManyToManyField(f.get_related_type().uniq_name, **kwargs)
|
340
|
|
- else:
|
|
337
|
+ else: #Unknow data type
|
341
|
338
|
raise NotImplemented("The conversion to django fields is not yet implemented for %s field type"%f.ftype)
|
342
|
339
|
|
343
|
340
|
|