Skip to content

Raj160907/demo_oye_rickshaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

demo_oye_rickshaw

Steps to run the application:-

  • clone the project - git clone https://github.com/Raj160907/demo_oye_rickshaw.git
  • create and start a virtual environment - virtualenv env -p python3
  • Activate virtual environment - source env/bin/activate
  • Install the project dependencies: - pip install -r requirements.txt
  • create a postgres db and add the credentials to settings.py -
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'db_name',
        'USER': 'username',
        'PASSWORD': 'userpassword',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}
  • connect to your database and run following command -
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
  • update database engine -
DATABASES = {
    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.postgis',
        ...
    }
}
  python manage.py makemigrations
  python manage.py migrate
  python manage.py runserver

Approach

  • The approach is to create three tables mainly - User, UserLocation and DriverRickshaw.
  • A foreign key of user goes into the UserLocation Table which specifies the current location of the rider or the driver.
  • The User table has user_type which specifies of the user is a rider or a driver.
  • All the user details are stored in the User table.
  • All the user locations are stored in the UserLocations
  • Only the lates location of a particular user is set to TRUE and only that is captured during search of drivers.
  • The third table DriverRickshaw is used to store the vehicle id and the vehicle details of all the drivers so that the vehicle number is sent to the rider, thus easy tracing.

Assumptions

  • The assumptions made is that the locations of all the drivers will be continuosly update from fronted based on their location coordinates and user_id in the UserLocation table.
  • One driver will have only vehicle registered to his/her name at a time.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages