Web application to analyze the content of public forums
copier copy gh:Tardo/gmg-template gmg
cd gmg
docker-compose up
See 'gmg-template' repo for more info: https://github.com/tardo/gmg-template
python -m pip install --upgrade pip
pip install poetry
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n
bash n latest
npm install --global npm
npm install --global postcss postcss-cli rollup
git clone git@gitlab.com:Tardo/gmg.git
cd gmg
poetry install
poetry run npm install
poetry run npm run srv:dev
Now can visit: http://localhost:8000
** Check the gmg.conf
file to enable various debug options. You will need
restart the service every time you edit this file.
*** You will need install 'pybabel'
** Do this using the project directory!
- Generate .pot file
pybabel extract -F babel.cfg -o messages.pot .
- Generate folder structure and .po file (Omit if you already do it)
pybabel init -i messages.pot -d translations -l <language code: ISO 639-1>
poetry run npm run upd:translations
-
Edit .po file(s) using for example 'poedit'
-
Update again to compile .mo with the lastest changes:
poetry run npm run upd:translations
- Create commit
poetry run flask db migrate -m "COMMIT MESSAGE"
-
Review migrations/versions/...py script
-
Apply the changes
poetry run flask db upgrade
- Get the exception
UnkownTimeZoneError
: To fix this configure the time zone of your system:dpkg-reconfigure tzdata