Skip to content

jaybjackie/ku-polls

Repository files navigation

Online Polls and Surveys Web Application

Unit test codecov
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.

How to Install and Run

  1. Clone this project repository to your local machine
git clone https://github.com/jaybjackie/ku-polls.git
  1. Go to this repository directory

    for MacOS/Linux

    cd ku-polls
    

    for WindowOS

    cd .\ku-polls\
    
  2. Create a virtual environment.

    python -m venv venv
    
  3. 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
    
  4. Install required packages.

pip install -r requirements.txt
  1. Create .env file in mysite/ 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]']
  1. Migrate the database.

    for MacOS/Linux

    python manage.py migrate
    

    for WindowOS

    python .\manage.py migrate
    
  2. 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
    
  3. Run the server.

    for MacOS/Linux

    python manage.py runserver
    

    for WindowOS

    python .\manage.py runserver
    

Go to the app: http://localhost:8000/

Project Documents

All project documents are in the Project Wiki.

DEMO run

You can uses these demo users below to visits the site.

Username Password
jay Thisis1stuser
jerome Thisis2nduser

Useful Link

django-tutorial
Django Girl Tutorial Tutorial with really good explanation.

About

An assignment in ISP course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published