]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blob - readme.md
Update table structure.
[philipp/winterrodeln/wradmin.git] / readme.md
1 # wradmin
2
3 Administration web interface for https://www.winterrodeln.org/
4
5 This web application uses flask (http://flask.pocoo.org/) and Python 3.
6
7 ## Run the application
8
9 ```{sh}
10 $ FLASK_APP=wradmin FLASK_DEBUG=1 FLASK_ENV=development WRADMIN_SETTINGS=development.cfg python3 -m flask run
11 $ FLASK_APP=wradmin WRADMIN_SETTINGS=production.cfg python3 -m flask run
12 ```
13
14 ## Test the application
15
16 ```{sh}
17 PYTHONPATH=. FLASK_APP=wradmin WRADMIN_SETTINGS=test.cfg python3 -m unittest
18 ```
19
20
21 ## Run the shell
22
23 Normal Python shell:
24
25 ```{sh}
26 $ FLASK_APP=wradmin FLASK_DEBUG=1 WRADMIN_SETTINGS=development.cfg python3 -m flask shell
27 ```
28
29 Ipython shell:
30
31 ```
32 $ FLASK_APP=wradmin FLASK_DEBUG=1 WRADMIN_SETTINGS=development.cfg ipython
33 >>> import wradmin.model
34 >>> wradmin.model.meta.Session.query(wradmin.model.MwUser).get(1)
35 ```
36
37 ## Deploy
38
39 Development environment:
40
41 ```
42 $ python setup.py bdist_wheel
43 $ scp bdist/wradmin-2.1.0.dev0-py3-none-any.whl colleen:
44 ```
45
46 Server environment:
47
48 ```
49 $ bin/wradmin stop
50 $ pip uninstall wradmin
51 $ pip install wradmin-2.1.0.dev0-py3-none-any.whl # or similar
52 $ bin/wradmin start
53 ```