A web application for polls and survey at Kasetsart University
An application for conducting a poll or survey, written in Python using Django. It is based on the Django Tutorial project, with additional functionality.
This application is part of the Individual Software Process course at Kasetsart University.
first clone this repository by use this command
git clone https://github.com/reviseUC73/ku-polls.git
go to project directory
cd ku-polls
Start the virtual environment.
- on macos and linux
source env/bin/activate
- on windows
. env/bin/activate
make sure that you install all the requirements by run this command, its can be whether pip, pip3
pip install -r requirements.txt
you have to create file name .env
file template looks like sample.env you can modify value and copy it into .env
Create .env
and write.
SECRET_KEY = secret-key-value-without-quotes
DEBUG = False
TIME_ZONE = Asia/Bangkok
Create a new database by running migrations the database.
python3 manage.py migrate
Import and Export the database.
Import the database python3 manage.py loaddata.
python3 manage.py loaddata data/polls.json data/users.json
Export the database python3 manage.py dumpdata
(Optional). Try dump all polls data to a file (-o) named polls.json
python3 manage.py dumpdata --indent=2 -o polls.json polls
In this time you can run server by use command
python manage.py runserver
but you have python3 use command
python3 manage.py runserver
next you go to http://127.0.0.1:8000/
or localhost:8000/
for application.
All project documents are in the Project Wiki
- Wiki Home
- Vision statement
- Requirements
- Project Plan
- Iteration Plan
Users provided by the initial data
Username | Password |
---|---|
demo1 | demopass1 |
demo2 | demopass2 |