The aim of this project is to give a convenient way for organizations (within the university) to process their reservations and easier management for the offices involved in the reservation process.
- Python 3
- Postgres (database)
- Django
- virtualenvwrapper
-
Install Python3 (if you don't have it) via Homebrew in MacOs or apt-get in Ubuntu.
-
Setup project environment with
virtualenv
. You can follow these intallation guide here. -
Now add environment variables to your shell startup file (.zshrc or .bashrc) and activate the
virtualenvwrapper
.export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/Devel source /usr/local/bin/virtualenvwrapper.sh
-
Install and run PostgreSQL. Ubuntu/Debian:
sudo apt-get install postgresql postgresql-contrib
Enter
psql
mode by:sudo -u postgres psql
Then create database and grant privileges to the created user. Let's have
upovrs
as sample database name andpersonnel
as user.CREATE DATABASE upovrs; CREATE USER personnel WITH PASSWORD 'upovrs'; GRANT ALL PRIVILEGES ON DATABASE upovrs TO personnel;
-
Clone the
upovrs
project. -
Activate the project's
virtualenv
and run this command to install the initial package requirements:
pip install -r <path_to_requirements.txt>
- Import the database models.
python manage.py migrate
- Now you're ready to go. Give the project a little nudge and then check your
localhost
.
python manage.py runserver