A tiny, beginner-friendly project to learn:
- HTML/CSS templating (Jinja)
- User registration & login (with password hashing)
- MySQL database via
mysql-connector-python - Session-based authentication
- Registering for events
- Python 3.10+ installed
- MySQL Server and MySQL Workbench installed
- A MySQL user (e.g.,
root) with a password you know
Windows (PowerShell):
cd event_management_miniproject
python -m venv .venv
.\.venv\Scripts\Activate
pip install -r requirements.txtmacOS/Linux (bash):
cd event_management_miniproject
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Open MySQL Workbench.
- Connect to your local server.
- Open
schema.sql(File → Open SQL Script), review, then click the lightning bolt to run.- This creates a database
event_miniand seeds a few sample events.
- This creates a database
- (Optional) In Workbench, expand
Schemas → event_minito see tables.
Edit config.py to match your MySQL setup:
DB_HOST = "127.0.0.1"
DB_PORT = 3306
DB_USER = "root"
DB_PASSWORD = "your_password_here"
DB_NAME = "event_mini"
SECRET_KEY = "change-this"python app.pyNow open http://127.0.0.1:5000 in your browser.
- Click Register for this event on the homepage.
- You’ll be asked to log in → If you are new, click Create an account.
- After registration, go back to Log in and sign in with the same email/password.
- If the password is wrong, you’ll see Incorrect email or password.
- Once logged in, click Register for this event again to register.
- Click My Registrations to confirm.
Run these queries:
USE event_mini;
SELECT id, full_name, email, created_at FROM users;
SELECT * FROM registrations;
SELECT e.title, e.event_date, r.registered_at
FROM registrations r JOIN events e ON e.id = r.event_id
ORDER BY r.registered_at DESC;Access denied for user: CheckDB_USER/DB_PASSWORDinconfig.py.Can't connect to MySQL: Make sure MySQL service is running and host/port are correct.Email already registered: Try logging in or use a different email.
- Add form validations and CSRF protection (Flask-WTF)
- Add event detail pages and cancel registration
- Add admin to create/edit events
- Send confirmation email (Flask-Mail)
- Deploy to a hosting provider