Go to file
Abhishek28112002 419eaa40ac
Update README.md
2022-06-02 15:45:22 +05:30
CDC_Backend Merge pull request #121 from CDC-IITDH/updating-readme 2022-06-01 23:22:47 +05:30
.gitignore Merge branch 'main' of https://github.com/CDC-IITDH/cdc-placement-website-backend 2022-05-19 19:18:05 +05:30
README.md Update README.md 2022-06-02 15:45:22 +05:30
dev.env Changes for Deadline changes and email sending 2022-04-30 22:27:49 +05:30
nginx.conf Few Changes Done 2022-05-01 14:56:46 +05:30
requirements.txt Bump pyjwt from 2.3.0 to 2.4.0 (#113) 2022-05-28 20:09:08 +05:30
setup.sh Added Few More Apis and corrected a view 2021-12-12 19:14:27 +05:30

README.md

python# CDC - Backend


Setup

  1. Download the Repository to your local machine
  2. Make Sour u have downloaded python from python.org
  3. Create a Virtual Environment in the CDC_Backend folder with this command below
    python -m venv venv
  4. Activate the environment with this command
    .\venv\Scripts\activate
  5. Install the dependencies
    pip install -r requirements.txt
  6. Ensure that you have the PostgreSQL installed on your machine and is running on PORT 5432
  7. Make sure to give the correct database credentials in settings.py
  8. Run these following commands ..
  9. cd CDC_Backend python manage.py flush --no-input python manage.py makemigrations python manage.py migrate python manage.py collectstatic --noinput mkdir Storage python manage.py makemigrations APIs

Running the Application

  1. Activate the environment with this command.
    .\venv\Scripts\activate
  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. if there is an error due to time then sync your machine time .
  4. Set up the Username and Password
  5. You can log in and change the database values anytime.
  6. Create your id as insitute Roll No for both admin and student . 7.if u are still getting an error ,open inspect and see in network And then recognize it 8.Check the client link in dev.env in backend and .env in frontend is the same

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