Welcome to the Cinema Website project, a web application built using Flask that allows users to create accounts, book tickets, and view a list of movies. Admin users have additional capabilities to manage movies and user accounts.
-
User Registration and Authentication:
- Users can create and manage their own accounts.
- Secure login and registration process.
-
Movie Listings:
- Browse a list of movies with detailed information.
- Search and filter movies by various criteria.
-
Ticket Booking:
- Book tickets for available movies.
- View booking history.
-
User Account Management:
- Users can edit their own account details.
-
Admin Panel:
- Admin users can add, delete, and edit movies.
- Manage user accounts and permissions.
- Python 3.6+
- pip (Python package installer)
- Virtual environment tool (optional but recommended)
-
Clone the repository:
git clone https://github.com/yourusername/cinema-website.git cd cinema-website
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required packages:
pip install -r requirements.txt
-
Set up the environment variables:
- Create a
.env
file in the root directory and add the following:FLASK_APP=app.py FLASK_ENV=development SECRET_KEY=your_secret_key
- Create a
-
Initialize the database:
- first in python script make sure you fill the app.config correctly to be contain the right (username / password / host / name of database) in your laptop...
- second:
flask db init flask db migrate flask db upgrade
-
insert the data of rooms & seats:
- you can find .txt file named "db seats + room" it contains set of commands to insert the data... Please copy paste them in workbench to be inserted.
- soon we will fix it to be automatically inserted with opn :)
-
Run the application:
flask run
-
Open your web browser and go to:
http://127.0.0.1:5000/
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.