2020-11-03 10:01:02 +01:00
2020-06-07 13:45:58 +02:00
2020-11-03 10:01:02 +01:00
2020-10-28 08:56:15 +01:00
2020-10-30 15:09:11 +01:00
2020-11-03 10:01:02 +01:00
2020-11-03 10:01:02 +01:00
2020-11-03 10:01:02 +01:00
2020-10-14 18:01:20 +02:00
2020-07-08 11:28:09 +02:00
2020-10-01 15:46:36 +02:00
2020-07-08 11:28:09 +02:00
2020-10-30 15:09:11 +01:00
2020-10-02 12:47:09 +02:00
2020-10-01 15:46:36 +02:00
2020-06-14 19:46:37 +02:00
2020-10-28 08:56:15 +01:00
2020-07-01 08:50:41 +02:00
2020-06-07 13:45:58 +02:00
2020-10-02 12:49:33 +02:00
2020-06-07 13:45:58 +02:00
2020-09-30 09:45:58 +02:00
2020-10-07 20:22:56 +02:00
2020-10-07 20:22:56 +02:00
2020-10-07 20:22:56 +02:00
2020-10-01 15:46:36 +02:00

Goslar Event Prototype

Website prototype using Python, Flask and Postgres running on Heroku.

Setup

Environment variables

Create .env file in the root directory and define the following variables:

DATABASE_URL=
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_OAUTH_CLIENT_SECRET=
OAUTHLIB_INSECURE_TRANSPORT=true
OAUTHLIB_RELAX_TOKEN_SCOPE=true
GOOGLE_MAPS_API_KEY=

Install and run

pip install -r requirements.txt
flask run --host 0.0.0.0

Development

Database

python manage.py db init
python manage.py db migrate
python manage.py db upgrade

Local development only

python manage.py db history
python manage.py db downgrade
// reset git: migrations/versions
python manage.py db migrate
python manage.py db upgrade

Kill local detached server

lsof -i :5000
kill -9 PIDNUMBER

i18n

https://pythonhosted.org/Flask-BabelEx/

Init

pybabel extract -F babel.cfg -o messages.pot . && pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot . && pybabel init -i messages.pot -d translations -l de

Neue msgid's scannen und in *.po mergen

pybabel extract -F babel.cfg -o messages.pot . && pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot . && pybabel update -i messages.pot -d translations

Nach dem Übersetzen

pybabel compile -d translations
Description
No description provided
Readme MIT 12 MiB
Languages
JavaScript 40.9%
HTML 37.7%
Python 20.8%
CSS 0.6%