- 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-backendpython3 -m virtualenv --python=$(which python3) env
source env/bin/activateTo install virtualenv, follow the instructions from here
cd tsaas-backend
pip install -r requirements.txtSometimes, 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/settingscreate a new filelocal_settings.py -
Copy the content of the
production_settings.pyintolocal_settings.py -
If you want to use
sqlite3for databaseInside file
local_settings.py, comment line 97 to 107 and uncomment line 112 to 121 -
If you plan to use
postgresqlConfigure 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
transdbtable
python manage.py makemigrations transdbpython manage.py runserverTo login to admin dashboard go to http://127.0.0.1:8000/admin/ and login using the credentials you created using step 5.2