Browse Source

[#76] The settings will be taken in a non versionned settings file

Roland Haroutiounian 9 years ago
parent
commit
292a3dc8f6
1 changed files with 2 additions and 11 deletions
  1. 2
    11
      DataSource/MySQL/MySQL.py

+ 2
- 11
DataSource/MySQL/MySQL.py View File

@@ -1,8 +1,7 @@
1 1
 # -*- coding: utf8 -*-
2 2
 
3
-
4 3
 import pymysql
5
-
4
+import settings
6 5
 
7 6
 ## @brief Manages the accesses to a MySQL datasource
8 7
 class MySQL(object):
@@ -12,15 +11,7 @@ class MySQL(object):
12 11
     field_lodel_id = 'lodel_id'
13 12
     class_table_prefix = 'class_'
14 13
     objects_table_name = 'object'
15
-    connections = {
16
-        'default': {
17
-            'module': pymysql,
18
-            'host': '127.0.0.1',
19
-            'user': 'lodel',
20
-            'passwd': 'bruno',
21
-            'db': 'lodel2'
22
-        }
23
-    }
14
+    connections = settings.DATABASE_CONNECTIONS
24 15
 
25 16
     @classmethod
26 17
     ## @brief gets the table name from class name

Loading…
Cancel
Save