| author | durandn |
| Wed, 05 Oct 2016 14:24:32 +0200 | |
| changeset 124 | 983e72b4bc45 |
| parent 90 | 00c9bb0f6f37 |
| permissions | -rw-r--r-- |
|
6
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
1 |
# METAEDUCATION DJANGO APP |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
2 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
3 |
# INSTALLATION |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
4 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
5 |
$ mkvirtualenv mtdc_renkan_env |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
6 |
$ pip install -r requirement.txt |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
7 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
8 |
# CONFIGURATION |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
9 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
10 |
Configure dev.py.tmpl according to your environment and rename it dev.py |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
11 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
12 |
# TEST AND DEV |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
13 |
|
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
14 |
$ Python manage.py runserver 0.0.0.0:8001 |
|
90
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
15 |
|
|
6
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
16 |
It is important to run the server on localhost:8001 if you are going to test with the flask OAuth server in the /oauth/ folder |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
17 |
|
|
90
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
18 |
Then we need to configure the Django-Allauth Social App. |
|
6
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
19 |
You will need a Client ID and Client Secret registered by the OAuth server that you will interact with. |
|
39cecdd5260e
Added OAuth2 Client Credentials Authentication workflow for Mtdc Application + Corrected mistakes on Authorization Code flow
durandn
parents:
0
diff
changeset
|
20 |
|
|
90
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
21 |
For this you need to log into the admin panel (after creating an admin superuser), and add an entry in the "Social Application" table. |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
22 |
You must assign a site to Renkan Social Application, which will be the base URL of Renkan (on test and dev, 127.0.0.1:8001) |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
23 |
|
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
24 |
# DEVELOPMENT |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
25 |
|
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
26 |
The assets source (css, lib and js) are found in the `assets` folder. They need to be build. |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
27 |
First install the dependencies (all command must be run in the same folder than this `README.md` file): |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
28 |
|
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
29 |
$ npm install |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
30 |
|
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
31 |
then build the assets with the command: |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
32 |
|
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
33 |
$ npm run-script build |
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
34 |
|
|
00c9bb0f6f37
Add asset compilation step to transpile js files for older browser (adn Safari)
ymh <ymh.work@gmail.com>
parents:
6
diff
changeset
|
35 |
The assets are goind to be build (by `babel`) in the `metaeducation/static/metaeducation` folder. |