An application for conducting online polls and surveys based on the Django Tutorial project, with additional features.
App created as part of the Individual Software Process course at Kasetsart University.
-
Python 3.9
or higher is required. -
Clone this GitHub repository. Or run this command:
git clone https://github.com/KwangSensei/ku-polls.git
-
Locate the file directory.
-
Change filename
sample.env
to.env
and adjust values as the instruction say. -
Run command below to create virtual environment.
# create the virtual env in "env/", only 1 time
python -m venv env
# start the virtual env in bash or zsh
. env\Scripts\activate
- Run command below to install required packages.
pip install -r requirements.txt
- Run migrations by fellow command:
python manage.py migrate
- If you wish to use data from data fixtures, please run command:
python manage.py loaddata polls\data_fixtures\polls.json
- Start the server by run:
python manage.py runserver
-
Then follow the link
http://localhost:8000
to web application. -
To create
admin
account:
python manage.py createsuperuser
# enter your username, email, password and password confirmation, in this case
Username: admin
Email address: admin@example.com
Password: **********
Password (again): *********
Superuser created successfully.
- Note: You can create new users, questions and choices in /admin page.
All project documents are in the Project Wiki.