Skip to content

tboonma/ku-polls

Repository files navigation

KU Polls

Django CI codecov
Web application for conducting online polls and surveys in Kasetsart University.

Project Documents

Vision Statement
Requirements
Iteration 1 Plan
Iteration 2 Plan
Iteration 3 Plan

Getting Started

Requirements

Name Recommended version(s)
Python 3.7 or higher
Django 2.2 or higher

Install Packages

  1. Clone this project repository to your machine.

    git clone https://github.com/tboonma/ku-polls.git
    
  2. Get into the directory of this repository.

    cd ku-polls
    
  3. Create a virtual environment.

    python -m venv venv
    
  4. Activate the virtual environment.

    • for Mac OS / Linux.
    source venv/bin/activate
    
    • for Windows.
    venv\Scripts\activate
    
  5. Install all required packages.

    pip install -r requirements.txt
    
  6. Create .env file in mysite/ and write down:

    DEBUG=True
    SECRET_KEY=Your-Secret-Key
    ALLOWED_HOSTS=localhost,127.0.0.1
    
  7. Run this command to migrate the database.

    python manage.py migrate --run-syncdb
    
  8. Initialize data

    python3 manage.py loaddata users polls
    
  9. Start running the server by this command.

    python manage.py runserver
    

Running KU Polls

Users provided by the initial data (users.json):

Username Password
demo1 Vote4me!
demo2 Vote4me2