This is a Django-based quiz application that allows users to answer questions on various topics. The application supports multiple choice questions and tracks correct answers. More features wil be added progressively. The application is aimed at enabling users enhance their general knowledge on various topics.
- Python 3.x
- Django 3.x or later
- PostgreSQL (or any other preferred database)
-
**Clone the repository:**ry o
Clone the repository from GitHub to your local machine. 6
-
Create a virtual environment:
Create and activate a virtual environment to manage dependencies.
-
Install the dependencies:
Install the required Python packages using a
requirements.txtfile. -
Setup the database:
Configure your database settings in
final_project/settings.py. -
Apply the migrations:
Apply the database migrations to set up the necessary tables.
-
Create a superuser:
Create a superuser to access the Django admin interface.
-
Run the development server:
Start the Django development server to run the application locally.
To populate the database with initial data (topics, questions, and choices), you can use the provided script.
-
Script to populate the database:
There is a script available to populate the database with predefined topics, questions, and choices. Save the script as
populate.pyand run it using the appropriate command.
Once the server is running, you can:
- Visit the admin interface to manage your quiz content.
- Access the quiz functionality through the designated URLs and views.
Contributions are welcome! To contribute:
- Fork the repository on GitHub.
- Create a new branch for your feature or bugfix.
- Commit your changes with clear and descriptive messages.
- Push your changes to your forked repository.
- Submit a pull request to the main repository with a description of your changes.