Go to file
karthik mv b94d63febe
Update postgres.md
2023-05-02 00:49:01 +05:30
CDC_Backend Merge pull request #151 from CDC-IITDH/gowtham/email-notification&minor-fixes 2022-12-06 17:13:56 +05:30
doc/setup Update postgres.md 2023-05-02 00:49:01 +05:30
.DS_Store Prod (#141) 2022-09-12 11:24:50 +05:30
.gitignore Tracking object changes (#132) 2022-07-21 16:41:31 +05:30
CDC_Backend.zip Prod (#141) 2022-09-12 11:24:50 +05:30
Email_service_README.md Prod (#141) 2022-09-12 11:24:50 +05:30
README.md Update README.md 2022-09-10 10:45:34 +05:30
nginx.conf updating max body size 2022-09-27 12:36:47 +05:30
requirements.txt import export for data models in django admin (#138) 2022-08-11 13:02:26 +05:30
setup.sh Added Few More Apis and corrected a view 2021-12-12 19:14:27 +05:30
start_email_service.sh Prod (#141) 2022-09-12 11:24:50 +05:30

README.md

python# CDC - Backend


Setup

  1. Download the Repository to your local machine
  2. Create a Virtual Environment in the CDC_Backend folder with this command below
    python -m venv venv
  3. Activate the environment with this command
    .\venv\Scripts\activate (for WINDOWS)
    source ./venv/bin/activate (for LINUX)
  4. Install the dependencies
    pip install -r requirements.txt
  5. Ensure that you have the PostgreSQL installed on your machine and is running on PORT 5432
  6. Make sure to give the correct database credentials in settings.py(https://www.youtube.com/watch?v=bE9h6aAky4s&t=193s)

Running the Application

  1. Activate the environment with this command.
    .\venv\Scripts\activate (for WINDOWS)
    source ./venv/bin/activate (for LINUX)
  2. Start the application by running this command (Run the command where manage.py is located)
    python manage.py runserver

Accessing the Admin Panel

  1. You can access the admin panel by running the server and opening http://localhost:8000/admin
  2. Run python manage.py createsuperuser to create a user to access the admin panel.
  3. Set up the Username and Password
  4. You can log in and change the database values anytime.

Error

1.make sure that your machine time and google time are same ,if not go to setting of date and time and sync this 2.make sure u have used same id for both student and Admin that is your iitfh roll_no 3. same client link in .env of frontend or constants.py of bakcend

Deploying

  1. Add the hosted domain name in ALLOWED_HOSTS in settings.py
  2. Update the CORS_ORIGIN_WHITELIST list and CORS_ORIGIN_ALLOW_ALL variable

Starting the Email Server

Run the following command to start the email backend process
python manage.py process_tasks

API Reference

Check here for Api Reference

For Documentation with Postman Collection, click here