Allow KU communities to create and participate in any polls and surveys on KU Polls.
The app was built using Django.
App created as part of the Individual Software Process course at Kasetsart University.
- Clone this project repository to your local machine
git clone https://github.com/jaybjackie/ku-polls.git
-
Go to this repository directory
for
MacOS/Linux
cd ku-polls
for
WindowOS
cd .\ku-polls\
-
Create a virtual environment.
python -m venv venv
-
Activate the virtual environment.
- for
MacOS/Linux
. venv/bin/activate
- for
WindowOS
.\venv\Scripts\activate
In case
cannot be loaded because running scripts is disabled on this system
To enable, on Window PowerShell(Terminal/ Command Prompt) run as administrator this commmand:
Set-ExecutionPolicy RemoteSigned
If you want to disable:
Set-ExecutionPolicy Restricted
- for
-
Install required packages.
pip install -r requirements.txt
- Create
.env
file inmysite/
and modify by the following lines:
# Create a secret key using ...
# python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
SECRET_KEY = YOUR-SECRET-KEY
DEBUG = False
ALLOWED_HOSTS = ['.localhost', '127.0.0.1', '[::1]']
-
Migrate the database.
for
MacOS/Linux
python manage.py migrate
for
WindowOS
python .\manage.py migrate
-
Initialize data
for
MacOS/Linux
python manage.py loaddata data/users.json polls.json
for
WindowOS
python .\manage.py loaddata .\data\users.json .\polls.json
-
Run the server.
for
MacOS/Linux
python manage.py runserver
for
WindowOS
python .\manage.py runserver
Go to the app: http://localhost:8000/
All project documents are in the Project Wiki.
You can uses these demo users below to visits the site.
Username | Password |
---|---|
jay | Thisis1stuser |
jerome | Thisis2nduser |
django-tutorial
Django Girl Tutorial Tutorial with really good explanation.