- Homepage: https://tsaas.iitr.ac.in
- Wiki: https://tsaas.iitr.ac.in/wiki
- Privacy policy: https://tsaas.iitr.ac.in/privacypolicy
git clone https://github.com/teg-iitr/tsaas-backend
python3 -m virtualenv --python=$(which python3) env
source env/bin/activate
To install virtualenv
, follow the instructions from here
cd tsaas-backend
pip install -r requirements.txt
Sometimes, depending on your choice of database installing postgresql
may also be required, which can be done following instructions for MacOS, Linux and Windows
We recommend using postgresql
only in production environment, for development we recommend using sqlite3
which comes pre-installed with python
.
-
Inside folder
tsaas-backend/transport/settings
create a new filelocal_settings.py
-
Copy the content of the
production_settings.py
intolocal_settings.py
-
If you want to use
sqlite3
for databaseInside file
local_settings.py
, comment line 97 to 107 and uncomment line 112 to 121 -
If you plan to use
postgresql
Configure your database in
local_settings.py
[line 97 to 107]# ---> WE ARE USING POSTGRES AS RECOMMENDED BY DJANGO. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'name_of_database', # ---> REPLACE THIS WITH THE NAME OF YOUR OWN DATABASE 'USER': 'dummy_username', # ---> REPLACE THIS WITH THE USERNAME YOU CREATE IN PSQL 'PASSWORD': 'dummy_password', # ---> REPLACE THIS WITH THE PASSWORD YOU CREATE IN PSQL 'HOST': 'localhost', 'PORT': '', } }
- Apply migrations
python manage.py migrate
- Create superuser for database
python manage.py createsuperuser
- Make migrations for our
transdb
table
python manage.py makemigrations transdb
python manage.py runserver
To login to admin dashboard go to http://127.0.0.1:8000/admin/
and login using the credentials you created using step 5.2