House of Damascus is a web application designed for a restaurant, offering users access to information about the restaurant, its menu, location, and an integrated booking system. Users can register, log in, make reservations, and review their booking history and edit them.
Explore the live demo: House of Damascus Demo
- Project Features
- Design Process and Reasoning
- Models
- Database Schema
- Features to be Implemented
- Technology & Resources
- Testing)
- Deployment
- Credits -Content -Media
The navigation bar adapts to the current site section, providing easy access to different pages. It remains fixed at the top of the screen for convenient navigation.
A footer which displays copyrights for the website.
The home page welcomes users with restaurant opening times and a quick link to the booking area. Elements on the page adjust based on the device screen size.
A static page showcases the restaurant's food and prices. The layout is responsive, switching from two to one-column design on smaller screens.
An admin area is accessible only by administrators, providing a link to view all booking entries in the database.
User authentication is managed through sign-up, sign-in, and sign-out forms. The forms include necessary validation and links for a seamless user experience.
The booking form, displayed upon signing in, allows users to select the date, time, and group size for a reservation. It includes restrictions on available days, times, and group sizes.
After a successful booking, users can view their specific booking list. The list displays booking status and provides buttons for updating or deleting entries.
A button allows users to update details of a pending or confirmed booking. The form allows users to confirm or return without changes.
A button enables users to delete a booking, displaying details and a confirmation prompt. Users can confirm and delete or return without deletion.
An admin area includes a list of all bookings, with a dropdown option to set booking status as confirmed or canceled.
Custom error page 404 provide links back to valid areas of the site, enhancing user experience in case of errors.
At House of Damascus, simplicity and clarity are prioritized. The design philosophy revolves around creating intuitive and user-friendly experiences that prioritize ease of use and accessibility. The design is clean, minimalist, and aesthetically pleasing to ensure that visitors can navigate the website effortlessly.
The House of Damascus website employs a simple color palette consisting of white, gray, and black. These neutral colors were chosen for their versatility, allowing content and visuals to stand out without overwhelming the user. The use of white promotes a sense of cleanliness and spaciousness, while gray and black add depth and contrast to the overall design.
For typography, the Arial font family was selected for its readability and familiarity. Arial offers a clean and modern look that complements the minimalist design aesthetic. Its simplicity ensures that content remains easy to read across different devices and screen sizes, enhancing the user experience.
The design process follows a systematic approach aimed at delivering a seamless and cohesive website experience. Here's an overview of the design process:
-
Research: Thorough research was conducted to understand the target audience, their preferences, and their expectations from a restaurant website with a booking system like House of Damascus.
-
Conceptualization: Based on research findings, various design ideas were brainstormed and conceptualized to align with the brand identity and user needs.
-
Prototyping: Wireframing and prototyping tools were used to create mockups visualizing the layout, structure, and functionality of the House of Damascus website.
-
Feedback and Iteration: Feedback was gathered from random users, incorporating suggestions and making iterative improvements to the design.
-
Finalization: After multiple rounds of refinement, the design was finalized, ensuring that it met objectives and satisfied the needs of the target audience.
By adhering to these principles and processes, House of Damascus has crafted a website that delivers a seamless and enjoyable user experience, reflecting the commitment to simplicity, clarity, and user-centric design.
The User
model is provided by Django's authentication system and represents registered users of the application.
Fields:
username
: CharField, representing the unique username of the user.email
: EmailField, representing the email address of the user.password
: CharField, representing the hashed password of the user.
Relationships:
- Each
User
can have multipleBooking
objects associated with them.
The Booking
model represents a reservation made by a user for a specific date and time.
Fields:
guest
: ForeignKey to the User model, representing the user who made the booking.date
: DateField, representing the date of the booking.time
: CharField with choices, representing the time slot for the booking.group
: PositiveIntegerField, representing the number of guests in the booking group.status
: CharField with choices, representing the status of the booking (Pending, Confirmed, Cancelled).is_cancelled
: BooleanField, indicating whether the booking has been cancelled.created_on
: DateTimeField, representing the timestamp when the booking was created.
Relationship:
- Each
Booking
is associated with a singleUser
who made the reservation.
Methods:
__str__
: Returns a string representation of the booking, including the guest's username, date, and time.
Meta:
ordering
: Specifies the default ordering of Booking objects by their creation timestamp.
The database schema for the House of Damascus project is based on the following models:
Field | Type | Description |
---|---|---|
id | IntegerField | Primary key |
username | CharField | Unique username of the user |
EmailField | Email address of the user | |
password | CharField | Hashed password of the user |
Field | Type | Description |
---|---|---|
id | IntegerField | Primary key |
guest_id | ForeignKey | Foreign key referencing the User model |
date | DateField | Date of the booking |
time | CharField | Time slot for the booking |
group | PositiveIntegerField | Number of guests in the booking group |
status | CharField | Status of the booking (Pending, Confirmed, Cancelled) |
is_cancelled | BooleanField | Indicates whether the booking has been cancelled |
created_on | DateTimeField | Timestamp when the booking was created |
The following features are identified as long-term goals to enhance user experience:
- Users can book without the need to log in.
-
Python Modules:
- asgiref==3.7.2
- dj-database-url==0.5.0
- Django==5.0.1
- django-allauth==0.57.0
- django-summernote==0.8.20.0
- gunicorn==20.1.0
- oauthlib==3.2.2
- psycopg2==2.9.9
- PyJWT==2.8.0
- python3-openid==3.2.0
- requests-oauthlib==1.3.1
- sqlparse==0.4.4
- whitenoise==5.3.0
-
Django:
- Main Python framework for project development.
- django-allauth is used for managing user accounts in the booking system.
- Jinga/Django templating is employed for queries to the database and inserting data onto site pages.
-
Deployment Platforms:
- Heroku: Cloud-based deployment platform.
- ElephantSQL: Database hosting service.
-
Frontend Technologies:
- HTML: Base coding language for templates and site content.
- Bootstrap: Main design layout and formatting framework.
- CSS: Modifications to Bootstrap behavior and additional custom stylings.
- Development Tools:
- Gitpod: IDE used for coding and file transfer between editor and repository.
- GitHub: Version control and repository hosting.
- Balsamiq: Wireframe models for site design.
- DBDiagram: Database diagram creation tool.
- Google Fonts: Styling the text throughout the site.
- Google Maps: Creating a specific map for the Location page.
- Markdown Table Generator: Creating tables for documentation.
- Documentation:
- Django Documentation: Reference for achieving CRUD functionality and associated views.
- Django-allauth Documentation: Guide for implementing authentication features correctly.
- Code Institute: Course help to create the project.
Automated testing was conducted to ensure the functionality and integrity of the project. The testing process included the following:
-
Reservation Form Testing:
- The reservation form was tested with various scenarios, including minimum and maximum group sizes, past dates and times, and invalid time values.
-
Access Control Tests:
- Views that require authentication were tested to ensure they are not accessible to unauthenticated users.
-
Permissions Tests:
- Tests were conducted to verify that only the booking owner can update or delete their booking.
-
Error Handling Tests:
- The application's handling of unexpected errors, such as database connection issues, was tested.
-
Template Rendering Tests:
- Tests were added to ensure the correct templates are being used to render views.
-
Custom 404 View Test:
- The custom 404 view was tested to ensure it renders the correct template.
-
Update Own Booking Test:
- The ability of a user to update their own booking was tested.
-
Update Other User's Booking Test:
- The prevention of a user updating another user's booking was tested.
-
Delete Own Booking Test:
- The ability of a user to delete their own booking was tested.
-
Delete Other User's Booking Test:
- The prevention of a user deleting another user's booking was tested.
-
User Authentication Test:
- The authentication of users and access to certain views was tested.
-
User Authorization Test:
- The prevention of users updating or deleting bookings created by other users was tested.
-
Date and Time Availability Test:
- The handling of date and time availability to prevent double bookings was tested.
-
Error Handling Scenarios Test:
- The application's response to various error scenarios, including 404 pages and form validation errors, was tested.
-
Date and Time Availability Test:
- The handling of date and time availability to prevent double bookings was tested.
-
Create a Booking:
- Navigate to the booking form page.
- Enter valid details such as date, time, and group size.
- Submit the form and verify that the booking is successfully created.
-
View Bookings:
- Log in as a registered user.
- Navigate to the booking list page.
- Verify that all bookings associated with the logged-in user are displayed.
-
Update Booking:
- Log in as the user who created the booking.
- Navigate to the booking update page for the desired booking.
- Modify the booking details and submit the form.
- Verify that the booking details are updated accordingly.
-
Delete Booking:
- Log in as the user who created the booking.
- Navigate to the booking list page.
- Click on the delete button for the desired booking.
- Confirm the deletion and verify that the booking is removed from the list.
-
Error Handling:
- Access non-existent pages and verify that the custom 404 page is displayed.
- Submit forms with invalid data and verify that appropriate error messages are shown.
-
Login Functionality:
- Navigate to the login page.
- Enter valid credentials and submit the form.
- Verify that the user is redirected to the home page after successful login.
-
Access Control:
- Attempt to access restricted pages without logging in.
- Verify that the user is redirected to the login page.
-
User Permissions:
- Attempt to perform actions such as updating or deleting bookings created by other users.
- Verify that the user receives a permission denied error message.
- Prevent Double Bookings:
- Create a booking for a specific date and time.
- Attempt to create another booking for the same date and time.
- Verify that the second booking is rejected due to availability constraints.
The project was tested using the W3C Markup Validation Service and W3C CSS Validation Service to ensure that the code meets industry standards.
- W3C Markup Validation Service: Ensures HTML code validity.
- W3C CSS Validation Service: Checks the validity of CSS code.
Google Chrome sometimes shows that the website is unsafe, a request to Google was sent to fix this issue.
This project was deployed to Heroku using these steps:
- Create a Heroku account and install the Heroku CLI.
- Initialize a Git repository in your project folder (
git init
). - Log in to Heroku CLI (
heroku login
) and create a new Heroku app (heroku create
). - Set up Heroku PostgreSQL as the database (
heroku addons:create heroku-postgresql
). - Push your code to the Heroku remote (
git push heroku master
). - Run migrations and set up the database (
heroku run python manage.py migrate
). - Deploy your app to Heroku (
git push heroku master
). - Application should now be deployed and accessible via the provided Heroku app URL.
The content for this website was generated using the following tools:
- ChatGPT: Used for generating and refining website content to ensure clear and informative text.
- Grammarly: Employed for proofreading and enhancing the overall writing quality.
The combination of these tools contributed to creating engaging and error-free content for the House of Damascus Restaurant website.
-
Favicon: ![Favicon] Image Credit
-
Background Image: ![Background Image]Image Credit
-
Menu Images:
- Breakfast Buffet ![Breakfast Buffet]Image Credit
- Lunch Buffet ![Lunch Buffet]Image Credit
- Dinner Buffet ![Dinner Buffet]Image Credit