Merge pull request #124 from CDC-IITDH/Abhishek28112002-patch-1

Update README.md
This commit is contained in:
karthik mv 2023-05-30 15:04:32 +05:30 committed by GitHub
commit 1c5fc21f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 3 deletions

View File

@ -5,7 +5,8 @@ python# CDC - Backend
### Setup
1. Download the Repository to your local machine <br>
2. Create a Virtual Environment in the [CDC_Backend](./) folder with this command below <br>
2. Make Sure u have downloaded python from python.org or windows store.
3. Create a Virtual Environment in the [CDC_Backend](./) folder with this command below <br>
`python -m venv venv`
3. Activate the environment with this command <br>
`.\venv\Scripts\activate` (for WINDOWS) <br>
@ -14,6 +15,17 @@ python# CDC - Backend
`pip install -r requirements.txt `
5. Ensure that you have the PostgreSQL installed on your machine and is running on PORT **5432** <br>
6. Make sure to give the correct database credentials in [settings.py](./CDC_Backend/CDC_Backend/settings.py)(https://www.youtube.com/watch?v=bE9h6aAky4s&t=193s)
7. Run these following commands below. (The same are there in setup.sh for linux users and setup.bat for windows users)
```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
@ -28,13 +40,20 @@ python# CDC - Backend
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.
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 you 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
# 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](./CDC_Backend/CDC_Backend/settings.py)