ku-polls/README.md
2023-08-31 17:58:23 +07:00

1.9 KiB

KU Polls: Online Survey Questions

An application to conduct online polls and surveys based on the Django Tutorial project, with additional features.

Install and Run

  1. Install Python 3.11.4 or later
  2. Run these commands to clone and install requirements.txt
git clone https://github.com/Sosokker/ku-polls
cd ku-polls
pip install -r requirements.txt
  1. Create file call .env in ku-polls directory and add this line
SECRET_KEY=your_secret_key

You can generate your own your_secret_key by this command

python manage.py shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"

or

Don't forget to change your_secret_key to your secret key (without quote)

  1. Run these commands
python manage.py migrate
python manage.py loaddata data/polls-v1.json
python manage.py loaddata data/user.json
python manage.py runserver

Then connect to http://127.0.0.1:8000/ or localhost:8000/

Recommend

You can create virtual environment by using this command before install requirements.txt

  1. Install virtualenv via pip
python -m pip install --user virtualenv
  1. Run these commands
python -m virtualenv .venv
  1. Use virtual environment
.venv\Scripts\activate

Demo Superuser

Username Password
admin ineedmorebullets

Project Documents

All project documents are in the Project Wiki.

django-tutorial