A train management system built using Django framework. It is designed for passengers/users to search,book and cancel train tickets.
- Signup, Login and Logout securely
- Search train
- View train schedules/timetable
- Check seat availability
- Login using OTP
- Confirm booking
- View booking history
- Fare enquiry
- Ticket cancellation
- Change password
- Forgot password
Python and Django need to be installed
pip install django
Go to the Rail-Safar folder and run
python manage.py runserver
Then go to the browser and enter the url http://127.0.0.1:8000/railways/login_view
-
Before authentication, navbar only displays login and sign up options.
-
After authentication, navbar displays all sections.
-
A user cannot jump from one url to another without logging in.
Enter a unique username, email address and password to create an account. The directions for a strong password are also provided.
-
If you are an existing user, enter username and password to login. Else, sign up to create an account.
-
Also a new admin user can be created using
python manage.py createsuperuser
or
python manage.py createsuperuser --username <username> --password <password>
-
Users who haven't signed up can still login by using this feature.
-
Enter a unique username and valid email address. OTP will be sent to the email address you entered.
-
You'll be redirected back to login page where you'll have to enter the same username and OTP to login.
-
Users who forgot their old password can use this section to login with new passoword/otp, then set a new password of their choice by navigating to "change password" section.
-
Only pre existing user (users who have already signed up) can use this feature.
-
Enter your email for your old username and new password/otp to be sent. Use these credentials to login.
-
You'll be redirected to this page after logging in.
-
Enter origin station, destination and date of journey.
-
Displays all trains which passes through your origin/destination station and runs on your selected DOJ.
-
Select the train, coach and total number of passengers.
Displays the days on which the train runs and the ETA at each station.
Enter name, age and gender of each passenger.
-
Displays the passenger details, train name and number, coach, DOJ, source and destination stations.
-
Fare is calculated on basis of distance travelled, coach, number of passengers and type of train (Premium or Express)
-
Only signed up users can confirm booking. Users logged in with OTP cannot.
-
Once confirmed, a confirmation email will be sent to your registered email address with all the details. This also serves the purpose of a ticket.
-
Once the booking is confirmed, you'll be redirected to this section.
-
It displays history of all the bookings done by the user.
-
You can also cancel bookings from this section.
-
A User who has logged in with OTP will not be allowed to use this section.
-
Signed up users should enter their old and new passwords to change password.
-
Once changed, you'll be logged out of the system and have to login using the new password.
Go to the browser and enter the url http://127.0.0.1:8000/admin
If a new train is introduced, the following models should be updated in order:
Trains --> Stations --> Train days --> Distance