VIP Ticket Booking Platform - DjangoVIP Ticket Booking Platform - Django
End to End Tickert Booking App made with Django and Tailwind CSSVIP Ticket Booking Platform - Django
End to End Tickert Booking App made with Django and Tailwind CSSOverview
Key Features
- User Management
- Multiple login methods: users can register and log in using email/password or Google authentication.
- Profile management to enhance user experience.
- Ticket Booking
- A user-friendly interface for browsing events and available tickets.
- Easy ticket selection and a streamlined checkout process.
- Stripe Payment Integration
- Secure online payments processed through the Stripe payment gateway.
- Ensures data protection and reliable transactions for users.
- Coupon Code Management
- Users can apply discount codes at checkout.
- Helps enhance user satisfaction and encourage repeat bookings.
- Banners Management
- Admins can create and manage promotional banners to showcase upcoming events or special offers.
- Enhances marketing efforts directly within the app.
Technologies Used
- Backend Development: Django
- Payment Processing: Stripe API
- Styling: Tailwind CSS
- Database: PostgreSQL (or similar)
- Frontend: HTML, CSS, JavaScript
Target Users
- Event Organizers: Looking for a streamlined platform to manage ticket sales and promotions.
- Attendees: Seeking a convenient and secure way to purchase tickets for various events.
Features
- End to End Ticket Booking Experience
- Movies and Events Management
- Coupon Management
- Banners Management
- Seat Layout Management
- User Management
- Banner Management
Requirements
- Django
- Tailwindcss
- Redis
- Sqlite3
Instructions
Ticketing Platform
A ticketing platform built using Django and styled with Tailwind CSS.
Features
- User authentication with Google OAuth
- Ticket creation and management
- Responsive design with Tailwind CSS
Installation
Follow these steps to set up the project locally:
- Clone the Repository
cd movie-backend
- Create a Python Virtual Environment
python -m venv venv
- Activate the Virtual Environment
- On Windows:
venvScriptsactivate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
- Install Required Packages
pip install -r requirements.txt
- Set Up Configuration Use the providedÂ
start-server.sh
 script to set up the server configuration.chmod +x start-server.sh ./start-server.sh
- Copy Example Environment Variables Create a newÂ
.env
 file based on the example:cp .env.example .env
Fill in the required variables in theÂ.env
 file. - Create Client Secret for Google OAuth Create a file namedÂ
client_secret.json
 and fill in the details obtained from your Google Developer Console. - Make Migrations
python manage.py makemigrations
- Run Migrations
python manage.py migrate
- Start the Django Server
python manage.py runserver
Usage
Once the server is running, navigate to <a href="http://127.0.0.1:8000">http://127.0.0.1:8000</a>
 in your web browser to access the application.
Important File Paths
- Templates:
app/templates
- Static Files:
static
Creating a Superuser
To access the Django admin panel, you need to create a superuser. Run the following command and follow the prompts:
python manage.py createsuperuser
Once the superuser is created, you can log in at http://127.0.0.1:8000/admin.
Bulk Adding Seats
You can add seats in bulk using the following command. This requires a seats file located at app/data/seats.txt
:
python manage.py add_hall --name='Screen 1' --theater-id=1 --seats-file="$(pwd)/app/data/seats.txt"Replace <code>'Screen 1'</code> and <code>1</code> with your desired screen name and theater ID, respectively.
Customizing the UI
- Tailwind CSS Configuration:
- To customize your UI, you can modify the Tailwind CSS configuration. Locate the
tailwind.config.js
file in your project and adjust the theme settings to fit your design preferences. - You can add custom colors, spacing, and breakpoints to enhance your application's look.
- To customize your UI, you can modify the Tailwind CSS configuration. Locate the
- Updating Templates:
- Modify the HTML files located in
app/templates
to customize the structure of your web pages. You can add new components, update existing layouts, and utilize Tailwind CSS classes to style elements. - If you're using Django template tags, ensure they are correctly integrated to maintain dynamic content.
- Modify the HTML files located in
- Adding Custom CSS:
- If you need additional styles not covered by Tailwind, create a custom CSS file in the
static
directory. Link this file in your templates to apply your custom styles.
- If you need additional styles not covered by Tailwind, create a custom CSS file in the
Customizing Data
- Models:
- To customize your data structure, modify the models defined in
app/models.py
. You can add new fields, change field types, or create new models to suit your application’s needs. - After making changes to your models, run:
python manage.py makemigrations python manage.py migrate
- To customize your data structure, modify the models defined in
- Admin Panel Customization:
- Customize how models are displayed in the Django admin panel by registering them in
app/admin.py
. You can customize list displays, search fields, and filters. - Example:
from django.contrib import admin from .models import YourModel @admin.register(YourModel) class YourModelAdmin(admin.ModelAdmin): list_display = ('field1', 'field2') search_fields = ('field1',)
- Customize how models are displayed in the Django admin panel by registering them in
- Creating Fixtures:
- If you want to pre-populate your database with data, consider creating fixtures. You can do this by exporting your data to JSON or XML format and then loading it using:
python manage.py loaddata your_fixture_file.json
- If you want to pre-populate your database with data, consider creating fixtures. You can do this by exporting your data to JSON or XML format and then loading it using:
Adding New Features
- Creating New Views:
- You can add new functionality by creating new views in
app/views.py
. Define your business logic here and link them to URLs inapp/urls.py
.
- You can add new functionality by creating new views in
- Implementing New Forms:
- Use Django forms to create new data entry points. Create forms in
app/forms.py
and render them in your templates for user input.
- Use Django forms to create new data entry points. Create forms in
- Integrating Third-Party Packages:
- Enhance your application by integrating third-party Django packages. Use
pip
to install packages and follow their documentation to implement new features.
- Enhance your application by integrating third-party Django packages. Use
Testing Your Application
- Make sure to write tests for your new features. You can create tests in
app/tests.py
and run them with:python manage.py test
Other items by this author
Category | Scripts & Code / Django |
First release | 4 November 2024 |
Last update | 8 November 2024 |
Files included | .py, .css, .html |
Tags | django, ticket platform, ticket booking platform |