Installation - Thanawas-Sirilertsathit/ku-polls GitHub Wiki
Steps to install KU-polls
- Clone github repository
git clone https://github.com/Thanawas-Sirilertsathit/ku-polls.git
- Change directory to ku-polls
cd ku-polls
- Create Virtual Environment
python -m venv env
- Activate Virtual Environment
env\Scripts\activate # For Window
source env/bin/activate # For MacOS and Linux
- Install dependencies
pip install -r requirements.txt
- Set up environment variables
echo "DEBUG=False" >> .env
echo "SECRET_KEY=your_secret_key_here" >> .env
echo "TIME_ZONE=Asia/Bangkok" >> .env
echo "ALLOWED_HOSTS=localhost,127.0.0.1,::1" >> .env
- Apply migration and load data
python manage.py migrate
python manage.py loaddata data/polls-v4.json data/votes-v4.json data/users.json
- Run the test
python manage.py test tests
After you complete all 8 steps, you can run the application.
Run the application
python manage.py runserver