Browse Source

Create a settings example, update the doc

ArnAud 8 years ago
parent
commit
5ca6fb3216
3 changed files with 16 additions and 28 deletions
  1. 1
    2
      .gitignore
  2. 2
    26
      README.md
  3. 13
    0
      settings.py.example

+ 1
- 2
.gitignore View File

@@ -2,7 +2,6 @@
2 2
 .venv
3 3
 .git
4 4
 .idea
5
-Lodel/settings/locale.py
6
-Lodel/settings/local.py
5
+settings.py
7 6
 doc
8 7
 .*.swp

+ 2
- 26
README.md View File

@@ -5,34 +5,10 @@ First test installation :
5 5
 ** install dependencies
6 6
   pip install -r requirements.txt
7 7
 
8
-** create local config in Lodel/settings/locale.py
9
-DATABASES = {
10
-    'default': {
11
-        'ENGINE': 'django.db.backends.mysql',
12
-        'NAME': 'lodel2',
13
-        'USER': 'lodel',
14
-        'PASSWORD': 'lodel',
15
-        'HOST': 'localhost',
16
-    }
17
-}
8
+** create local config in settings.py
9
+Copy settings.py.example to settings.py, change the conf to your local settings
18 10
 
19 11
 ** create DATABASES
20 12
   mysql
21 13
   > CREATE DATABASE `lodel2`  CHARACTER SET utf8 COLLATE utf8_general_ci;
22 14
   > GRANT ALL ON `lodel2`.* TO "lodel"@"localhost";
23
-
24
-** Apply patch(es) for django …
25
- - makemigrations_interactive_rename.patch => fix makemigrations interactive parameter
26
-  cd path/to/django/
27
-  patch -p2 < /path/to/lodel2/makemigrations_interactive_rename.patch
28
-
29
-** create tables for django
30
-
31
-if not clean :
32
-  mysql
33
-  > DROP DATABASE `lodel2`;
34
-  recreate database
35
-  rm -rf LodelTestInstance/migrations/
36
-
37
-  ./manage.py makemigrations --empty LodelTestInstance
38
-  ./manage.py migrate

+ 13
- 0
settings.py.example View File

@@ -0,0 +1,13 @@
1
+#-*- coding:utf8 -*-
2
+
3
+import pymysql
4
+
5
+DATABASE_CONNECTIONS = {
6
+    'default': {
7
+        'module': pymysql,
8
+        'host': '127.0.0.1',
9
+        'user': 'lodel',
10
+        'passwd': 'lodel',
11
+        'db': 'lodel'
12
+    }
13
+}

Loading…
Cancel
Save