X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wradmin.git/blobdiff_plain/91d21121d311c4680caac2be51299873b3fb138f..6210bbce4a3e24b97b7b317d9a620effe5b9b2fe:/readme.md diff --git a/readme.md b/readme.md index 0677e90..c9196a5 100644 --- a/readme.md +++ b/readme.md @@ -1,26 +1,54 @@ +# wradmin + +Administration web interface for https://www.winterrodeln.org/ + This web application uses flask (http://flask.pocoo.org/) and Python 3. -Run the application: +## Run the application + +```{sh} $ FLASK_APP=wradmin FLASK_DEBUG=1 FLASK_ENV=development WRADMIN_SETTINGS=development.cfg python3 -m flask run $ FLASK_APP=wradmin WRADMIN_SETTINGS=production.cfg python3 -m flask run +``` -Test the application +## Test the application + +```{sh} PYTHONPATH=. FLASK_APP=wradmin WRADMIN_SETTINGS=test.cfg python3 -m unittest +``` + + +## Run the shell -Run the shell: +Normal Python shell: + +```{sh} $ FLASK_APP=wradmin FLASK_DEBUG=1 WRADMIN_SETTINGS=development.cfg python3 -m flask shell +``` + +Ipython shell: -ipython shell: +``` $ FLASK_APP=wradmin FLASK_DEBUG=1 WRADMIN_SETTINGS=development.cfg ipython ->>> import wradmin.model ->>> wradmin.model.meta.Session.query(wradmin.model.MwUser).get(1) +>>> from wradmin.app import db +>>> from wradmin.model import MwUser +>>> user = db.session.query(MwUser).get(1) +``` + +## Deploy -Deploy: -Development environmen: +Development environment: + +```{sh} $ python setup.py bdist_wheel $ scp bdist/wradmin-2.1.0.dev0-py3-none-any.whl colleen: +``` + Server environment: + +```{sh} $ bin/wradmin stop $ pip uninstall wradmin $ pip install wradmin-2.1.0.dev0-py3-none-any.whl # or similar $ bin/wradmin start +```