This is the backend for the SMC Mess application. It is a REST API written in Python using the Django framework. The project is part of the 2023 summer internship at IISER Kolkata.
-
Clone the repository
-
Create a virtual environment and activate it
-
Create a
.env
file in the project base directory and add the followingEMAIL_ID = <youremailid@example.com> GOOGLE_APP_PASSWORD = <your-app-password>
-
Install the dependencies
pip install -r requirements.txt
-
Install celery and redis-server
sudo apt install celery redis-server
-
Make migrations
python manage.py makemigrations python manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Populate the database with fake data
python populate_db.py
-
Run the server
python manage.py runserver
-
In a seperate terminal, run the celery worker
celery -A MessSystemSMC worker -l info
-
Go to
http://localhost:8000/api
for a summery of all the api endpoints exposed