raj3k / quiz_app

Quiz application created using Django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quizzer

Project Description

The goal for this project is to create web app that will allow users to play the Quiz game. User selects the amount of questions, difficulty and categorty for the questions. Based on that application generates set of questions for user. Each question is displayed to user one by one. After answering them, the game is over and the player sees his score.

Technologies used

  • Python version 3.10
  • Django version 4
  • Bootstrap version 5.2

Challenges faced:

  • figuring out how to save user progress - resolved by saving and retriving progress from session
  • numbers of questions - for example user selects 10 easy questions from Art category but API have only 9 of them and sending request for 10 is returning response code 1 with empty list (API documentation: Code 1: No Results Could not return results. The API doesn't have enough questions for your query. (Ex. Asking for 50 Questions in a Category that only has 20.). Solved by returning the amount of questions that currently API have.
  • F5 issue on first question - clicking F5 on first question will load new question every time. To resolve this I used flag variable
  • and few other minor challanges/issues

###

Features planned to implement:

  • Current number of question (progress bar using Bootstrap library)
  • time cap for question -> currently working on that
  • limited hints in quiz
  • Documentation
  • Ranking

How to run application

  1. Clone repo
  2. Enter project: cd quiz_app/
  3. Create virtualenv: python3 -m venv venv
  4. Install requirements: pip3 install -r requirements.txt
  5. Source the virtual enviroment: source venv/bin/activate
  6. Run django application: python3 manage.py runserver Note: There is no need to migrate db yet.

How to run application using docker

  1. Clone repo
  2. Enter project: cd quiz_app/
  3. Run command in terminal: docker-compose up

About

Quiz application created using Django


Languages

Language:Python 78.8%Language:HTML 20.6%Language:Dockerfile 0.6%