Coder Social home page Coder Social logo

brainy-fools / railway-database-management-project Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 8.0 11.8 MB

Railway Ticketing Management System | Database: Oracle-19c | BackEnd: Django Framework | Query Language: ORM | Front-End: Javascript,CSS,HTML5

License: Mozilla Public License 2.0

PLSQL 1.38% JavaScript 29.15% CSS 44.86% HTML 22.01% Python 2.61%
dbms-project python django sql oracle-database railway-management database webapp oracle-db project

railway-database-management-project's Introduction

GitHub Org's stars GitHub forks GitHub issues GitHub pull requests GitHub watchers GitHub Sponsors GitHub GitHub last commit GitHub language count Lines of code GitHub repo size


How to install this project to run in localhost from your pc

!! important reminder

Django Only supports Oracle Database version 12c or above & we have performed this project in oracle 19c version
So download oracle 19c from this official site

After installing oracle database, need to create a user & grant some previlieges to handle this database. I have created a script for your convinence, run this script in any online python ide & copy the output & paste in your SQL PLUS
x = '''
CREATE USER <user_name> IDENTIFIED BY <password>;
GRANT CONNECT,RESOURCE,DBA TO <user_name>; 
GRANT CREATE SESSION TO <user_name> WITH ADMIN OPTION;
GRANT UNLIMITED TABLESPACE TO <user_name>;
GRANT "IMP_FULL_DATABASE" TO <user_name> ;
GRANT "EXP_FULL_DATABASE" TO <user_name> ;
GRANT "CONNECT" TO <user_name> ;
GRANT "RESOURCE" TO <user_name> ;
GRANT "DATAPUMP_EXP_FULL_DATABASE" TO <user_name> ;
GRANT "DATAPUMP_IMP_FULL_DATABASE" TO <user_name> ;
GRANT "AUTHENTICATEDUSER" TO <user_name> ;
'''
y = x.replace("<user_name>","c##SuperMan")
print(y.replace("<password>","Masum")) 
Here in replace section, Give your desired name of database user & password otherwise left it as it is.
One thing to be noted,user name must start with c## in oracle database to be common user

Now make a connection via SQL Developer/DataGrip (btw jetbrains DataGrip is used by me) where SID will be orcl and port 1521 and username & password will be newly created user & password. Here i have attached a DEMO of Database Connection

All set,now download our project from this gihub link
After opening this project in vs-code or pycharm. Open Railway > settings.py you will see something like this:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.oracle',
        'NAME': 'orcl',
        'USER': 'c##SuperMan',
        'PASSWORD': 'MasumBhai',
        'HOST': 'localhost',
        'PORT': '1521',
    }
}
Make sure that this database username and password are matched with your newly created user, password chekout my stackoverflow answer

Now few things need to install in your project terminal Or you can do it in command-prompt. Type these:
pip install Django
pip install django-debug-toolbar
pip install django-phone-field
pip install cx-oracle
if you see this error: ‘pip’ is not recognized as an internal or external command, then first you need to install pip help link to install pip

Now open project terminal & make sure all these below commands are running from where manage.py file is located. In our project it's inside Railway foldeer. Here is a helping image. Here django project is Railway and we used one app named train
py manage.py makemigrations 
py manage.py migrate
py manage.py runserver

All right. All setUp. Explore the site !! But when you will click the DashBoard For Admin You will see a LogIn Page For Admin. To Be an Admin , you have to create superuser from terminal.
Again in terminal, type:

ctrl+pause/break or ctrl+C to stop the runserver

To create superuser, follow my stackoverflow answer or just simply type in project terminal:

py manage.py createsuperuser

After successfully creating superuser run the server via

py manage.py runserver

and then click the 'DashBoard for admin' in header. Now give the username & password of newly created superuser.
Bhaiola!! You are now admin!! You can control this fully responsive webapp

At the begining no data is inserted, so you have to insert data manually in two table. Route & Train_info
The reason is: visitor will not control/monitor the route & train infos data, it's admin's work. here i have attached a demo data sheet of route & train infos. And when deleting users records, you have to follow this sequence (according to schema diagram):
First need to delete transections -> ticket -> passenger -> user

If any problem arises, just create an issue in this repository, I will try to figure that out.

After Payment Confirmation, End Product of this web-app

End Product as QR Code


admin_panel


Bill_details


Bill_details2


coming_soon


Footer


Index-Page


payment_info


payment_information


schedule


special_offer


traveller_info


railway-database-management-project's People

Contributors

masum035 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.