View on GitHub

django-example

Example of Hello World in Django with Tequila Authentication

Quick start pour les gens pressés

git clone git@github.com:epfl-sdf/django-example.git
cd django-example.git
./install_all.sh
./start.sh

Il faut utiliser tototutu comme password quand on vous le demande !
En moins de 3mn vous avez une installation Python/Django/Tequila qui tourne sur votre machine !


How to make it work

Virtualenv

Create and activate a virtualenv for the project:

Database

Secrets file

Create a file named secrets.json in the django_example folder containing the following :

{
    "SECRET_KEY": "what_you_want",
    "DB_PASSWORD": "db_password"
}

This file is used to avoid having passwords in the git repository. The SECRET_KEY can be anything (it is “abcde” on my dev machine), it just needs to be unique and long in the production server.

Last setups

Make it run

Differences between this code and django tutorial

In this example we adopt a different project layout from the tutorial, following a set of good practices used on other EPFL projects and presented in the book Two scoops of Django. Here are the changes :

Django-tequila

You can find django-tequila documentation here

Contact

Made by Gil Brechbühler. E-Mail : gil.brechbuhler@epfl.ch, do not hesitate to ask any question.