Welcome to Karls Lotterie! This is a simple web application built with Flask that allows users to participate in a lottery game and see their winnings. The application also provides an admin page to view all the recorded winnings and the total accumulated winnings.
-
Clone the repository to your local machine:
git clone https://github.com/Lo10Th/Karls-Lotterie cd lottery-app
-
Install the required dependencies using pip:
pip install Flask
-
Run the Flask application:
python main.py
-
Access the application in your web browser at
http://localhost:5500/
.
- To participate in the lottery, enter your desired bet amount and click the "Los kaufen" button on the homepage.
- The lottery game has three possible outcomes, each associated with a different prize amount.
- won4.html: If you win with a 1 in 3 chance, you will receive a 1.33 times return on your bet amount.
- won6.html: If you win with a 1 in 3 chance, you will receive a 2 times return on your bet amount.
- won8.html: If you win with a 1 in 3 chance, you will receive a 2.66 times return on your bet amount.
- lost.html: If you lose the lottery, you will lose your bet amount.
- Access the admin page at
/admin
to view all recorded winnings and the total accumulated winnings.
The application uses a SQLite database to store the lottery data. Each time a user participates in the lottery, their bet amount and the outcome are recorded in the database.
Contributions to improve the application are welcome! Feel free to create pull requests for bug fixes, enhancements, or new features.
If you want to run the tests do it like this:
python test_main.py
This project is licensed under the MIT License. See the LICENSE file for details.