Truffe 2 is the new intranet for AGEPoly - The EPFL's students' association.
Truffe 2 is licensed under the BSD license. Check LICENSE.md
- Cedric Cook (Fixed a typo)
- Yolan Romailler (Fixed a path)
- Yann Beaud (Fixed VCARDs)
This is a standard django project. Python requirements are stored in
This projects requires ImageMagick which can be obtained using
brew install freetype imagemagick
You will need access to tequila (EPFL internal network is enough) to login.
No initial database is provided. To begin, grant yourself admin rights in the database after a first login, and create at least one unit.
South is used for migrations. Be careful, some models are created dynamically!
You will need a
truffe2/app/settingsLocal.py file with your local settings (database, etc.). A template is provided in
truffe2/app/settingsLocal.py.dist. According to which database driver you choose, install the corresponding python package, e.g.
pip install mysql-python for MySQL.
Deployment scripts using fabric are located in the
Example development environment setup
- Create a virtual Python environment:
virtualenv --python=/usr/bin/python2 venv
- Activate it:
- Install dependencies:
pip install -r ./truffe2/data/pip-reqs.txt
./truffe2/app/settingsLocal.pyand set the database engine to
django.db.backends.sqlite3and database name to
- To be apple to see the mails sent from the application, run a maildump instance on port 1025
- Go inside the
truffe2directory for the next steps:
- Create the database tables not managed by south with
python manage.py syncdb
- On OSX, if you get
ImportError: MagickWand shared library not found., it's probably because Python was not installed using MacPorts, you have to export MAGICK_HOME path. You should try to set the path with
export MAGICK_HOME=/opt/localand go back to point 8.
- Create the database tables managed by south with
python manage.py migrate
- Run the development server with
python manage.py runserver
- Go to
http://localhost:8000/and log in with Tequila
- Give your user superuser rights with
echo "update users_truffeuser set is_superuser=1 where id=1;" | sqlite3 db.sqlite3