This is the source code of the "Lascilab" webpage, it was wrote using python3.6+.
Pleace make a backup of the database before perform the 'docker-compose down' command.
docker-compose exec web ./manage.py dumpdata --indent 2 index person event auth.user > backup.jsongit pull origin masterdocker-compose restart weblocate in the webpage directory and perform the following commad to remove the old version.
docker-compose down --volumes --rmi all --remove-orphansInstall Docker and Docker Compose.
docker-compose builddocker-compose up -dwhen the web service is ready, use the following command to load the static files for the admin page.
docker-compose exec web ./manage.py collectstaticto load the initial data of the database use the following command.
docker-compose exec web ./manage.py loaddata db.jsonAssuming you're on debian like OS
sudo apt-get update
sudo apt-get install python-dev python-pip libpq-dev
sudo pip install virtualenv virtualenvwrapper requests[security]locate in the webpage directory and perform the following commads to setup the development virtualenv.
mkvirtualenv --python=python3.6 .envactivate the development environment
source .env/bin/activateinstall the app requirements.
pip3.6 install -r dev_req.txtif the python virtual environment is active, use the following command to deactivate it.
deactivatecreate data base migrations. Note: every time you change a model you have to perform "makemigrations" and "migrate" in order to apply the changes to the database.
./manage.py makemigrationsapply migrations changes into the database.
./manage.py migrateto run the development server.
./manage.py runserver 0.0.0.0:8000