Skip to content

web application for polls and surveys at Kasetsart University

Notifications You must be signed in to change notification settings

natekrth/ku-polls

Repository files navigation

KU-Poll

Unittest codecov

Online Polls for Kasetsart University

An application for conducting a poll or survey, written in Python using Django. It is based on the [Django Tutorial project][django-tutorial], with additional functionality.

This application is part of the Individual Software Process course at Kasetsart University.

How to Install and Run

  1. Clone this project repository.

    git clone https://github.com/natekrth/ku-polls.git
    
  2. Go in to ku-polls directory.

    cd ku-polls
    
  3. Create a virtual environment.

    python3 -m venv env
    
  4. Start the virtual environment.

    on macos and linux

    source env/bin/activate 
    

    on windows

    . env/bin/activate
    
  5. Install required packages.

    pip install -r requirements.txt
    
  6. Create .env and write.

    SECRET_KEY = secret-key-value-without-quotes 
    DEBUG = False
    TIME_ZONE = Asia/Bangkok
    ALLOWED_HOSTS = localhost,127.0.0.1
    
  7. Create a new database by running migrations the database.

    python3 manage.py migrate
    
  8. Import and Export the database.

    8.1 Import the database python3 manage.py loaddata.

    python3 manage.py loaddata data/polls.json data/users.json
    

    8.2 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
    
  9. Start running server.

    python3 manage.py runserver
    

Demo User

Username Password
tester nohack1234
hacker hackme22

Project Documents

All project documents are in the Project Wiki

About

web application for polls and surveys at Kasetsart University

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published