/survey-application

A survey application where admin can create multiple survey and questions according to each survey. Every customer can participate on surveys. Admin can view a report of customers answers on surveys.

Primary LanguagePython

Survey Application

Getting Started

Python Installation

Additional Downloads

Apart from cloning this project, you also need the following -

Make sure you get both the PostgreSQL server, and the Postgres Admin. The default installation comes with both.

Running the project

Clone the repository.

git clone https://github.com/imraan024/survey-application.git

Create and activate a virtual environment for the project.

For creating virtual environment we can use packages like Virtualenv or Pyenv. I've used Virtualenv.

cd survey-application
virtualenv venv
source venv/bin/activate

Install all required packages.

pip install -r requirements.txt

Open .env.keep file and update these values.

# Comma separated hosts or IPs, set * to allow all
ALLOWED_HOSTS=127.0.0.1
DEBUG=True
# Secret key should be atleast 32 characters long and consists of alphanumeric and special characters
SECRET_KEY=****
#Create a database on postgres and update DB_URL according to your credentials
DB_URL=postgres://USER:PASSWORD@HOST:PORT/NAME

If you do any update on models run this command

python manage.py makemigrations

Run migrations to apply changes on database

python manage.py migrate

Create a super user

python manage.py createsuperuser

Run the project.

python manage.py runserver

Additional instruction

  1. After running project you need to log in using your super user credentials.
  2. You can sign up new user or add new user from default django admin dashboard.
  3. To make new user active you should have set user type as Customer and check the is_active field otherwise you can not log in using new users credentials.
  4. For New user creation you need to follow instruction 2 & 3 everytime.
  5. You can make new survey and add question to them from admin panel after log in as Admin
  6. You can participate on surveys from customer panel after log in as a Customer