Sugar Background Image Contest
This is the web application for the contest.
Development
-
If you don't have virtualenv:
sudo easy_install virtualenvOr
sudo pip install virtualenvOr
sudo apt-get install python-virtualenv -
Create environment:
virtualenv venv . venv/bin/activate pip install -r requirements.txt mkdir media chmod a+rwx media -
Create database:
python -c "from __init__ import init_db; init_db()"Or
sqlite3 contest.db < schema.sql -
Start:
python __init__.py -
In another console, serve media:
cd media python -m SimpleHTTPServer
Deployment
Pay attention to all the comments in __init.py__ that start with #FIXME PROD
Translations
To add a new language, run (example with 'es'):
pybabel init -i translations/messages.pot -d translations -l es
To add translatable strings
-
add these tags around the text:
{% trans %}text here{% endtrans %}. -
run
./babel_extract.sh -
edit the po files with a po editor
-
run
./babel_compile.sh