Browse Source

Renaming and moving files + fixed a bug in Lodel.settings imports

Lodel/sttings/__init__.py wasn't able to import files when called by manage.py
Renaming em to EditorialModel and moved Em* objects to EditorialModel/lib
Adding a first test (that do not pass because of syntax errors in Em* classes)
Yann Weber 9 years ago
parent
commit
8f2a3655bb

+ 0
- 0
EditorialModel/__init__.py View File


+ 0
- 0
EditorialModel/lib/__init__.py View File


em/class.py → EditorialModel/lib/class.py View File


em/component.py → EditorialModel/lib/component.py View File


em/field.py → EditorialModel/lib/field.py View File


em/fieldgroup.py → EditorialModel/lib/fieldgroup.py View File


em/type.py → EditorialModel/lib/type.py View File


+ 9
- 0
EditorialModel/test.py View File

@@ -0,0 +1,9 @@
1
+from django.test import TestCase
2
+from EditorialModel.lib.component import EmComponent
3
+
4
+class ComponentTestCase(TestCase):
5
+    def setup(self):
6
+        testComp = EmComponent(2)
7
+
8
+    def component_instanciate_with_numeric_id(self):
9
+        self.assertEqual(testComp.id, 2)

+ 4
- 4
Lodel/settings/__init__.py View File

@@ -1,13 +1,13 @@
1
-from defaults import *
1
+from Lodel.settings.defaults import *
2 2
 
3 3
 DEBUG = True
4 4
 
5 5
 if DEBUG:
6
-    from dev import *
6
+    from Lodel.settings.dev import *
7 7
 else:
8
-    from production import *
8
+    from Lodel.settings.production import *
9 9
 
10 10
 try:
11
-    from locale import *
11
+    from Lodel.settings.locale import *
12 12
 except ImportError:
13 13
         pass

Loading…
Cancel
Save