README
This project is a web application for managing flights and airports. It allows users to view and book flights, as well as manage airport information.
-
Flight Management: Users can view a list of flights, including their origin, destination, and duration. They can click on a flight to get more detailed information.
-
Airport Management: Users can view a list of airports and their corresponding flights. They can add, edit, and delete airports in the Database.
-
Passenger Management: Users can register as passengers and associate themselves with flights. Passengers have a Many-to-Many relationship with flights, allowing them to be booked on multiple flights.
-
Admin Interface: The project includes an admin interface that provides easy access to create, edit, and delete flights, airports, and passengers. Only authorized users with administrative privileges can access this interface.
-
Clone the repository from GitHub:
git clone https://github.com/SalmaAhmedAl/airline.git
-
Install the required dependencies:
cd airline
-
Apply database migrations:
python manage.py migrate
-
Create a superuser for accessing the admin interface:
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
-
Access the application in your web browser at
http://localhost:8000
.
-
To view the flights, airports, and passengers, log in to the admin interface using the superuser credentials created earlier. Access the admin interface at
http://localhost:8000/admin
. -
To view and book flights as a regular user, access the homepage at
http://localhost:8000
.
Contributions to the project are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub.