forked from PDA-Open-Source/PDA-WEB
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
vky25 edited this page Apr 19, 2022
·
1 revision
Welcome to the PDA-WEB wiki! GETTING STARTED
Installation steps
sudo apt update & sudo apt upgrade
sudo apt install python3-pip
python3 -m pip install --upgrade pip
pip install django==3.2
sudo pip3 install virtualenv
To verify run:
python3 --version
pip --version
django-admin --version
git clone https://github.com/arghyam/PDA-WEB.git
Creating virtual environment:
virtualenv env
source env/bin/activate
Checking out branch:
cd PDA-WEB
git checkout dev
Configurations
https://github.com/PDA-Open-Source/PDA-WEB/wiki/PDA-WEB#configuration
Code Changes
- Changes in mobileNumberValidation.js - Disabling min max length mobile number validation on the login screen since the validation was not working as expected
- Set phoneNumberMinLength, phoneNumberMaxLength to 10 var phoneNumberMinLength = 10; var phoneNumberMaxLength = 10;
- Comment line number 19 mobileNumberLengthValidation(filter, mobNum);
- Comment lines 22 to 33
- Remove lines 68 to 88
- Change line 71 to $("#phoneNumberErrorMessage").text(Please enter phone number");
- Changes in requirements.txt - earlier mentioned versions could not be installed
- Change line 11 to psycopg2-binary
- Change line 18 to six==1.10.0
- Add
certifi==2017.7.27.1 |
---|
- Changes in settings/base.py - Timezone had to be disabled. This may need additional configuration in order to be enabled.
- Comment line 139 USE_TZ = True
- Changes in apps/program/views.py - The response handling was broken and this is a fix for it.
- Change line 58 and 59 to
if response.status_code == 200:
response_result = response.json()
- Add files core/migrations/0002_auto_20220209_0922.py and apps/program/migrations/0011_auto_20220209_0922.py - adding missing fields in the models as part of migration
Steps to run the application
- Run pip3 install -r requirements.txt from the root directory
- In case you run into errors in step 1, run these following steps
sudo apt install libcurl4-openssl-dev libssl-dev
sudo apt-get install libjpeg-dev zlib1g-dev
pip3 install Pillow
- Re-run step 1
- Run python3 manage.py makemigrations
- Run python3 manage.py migrate
- In case you run into errors in step 5, run python3 manage.py migrate –fake instead.
- Run screen
- Run python3 manage.py runserver 0:8000