Coder Social home page Coder Social logo

rzghorbani72 / django-car-tracker-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alibigdeli/django-car-tracker-app

0.0 0.0 0.0 226 KB

this is a simple iot project for car tracking ,which is a server to see the location of your car

License: MIT License

JavaScript 0.34% Python 10.76% CSS 78.07% HTML 10.83%

django-car-tracker-app's Introduction

Django GPS Car Tracker App

this is a simple car tracking server as in backend and front to control your car locations

python django sqlite bootstrap html5 sqlite heroku

Overview

demo

Features

  • Django LTS
  • Class Based views (ApiView)
  • Django RestFramework
  • User authentication
  • Black
  • Flake8
  • Responsive Design
  • Bootstrap5
  • heroku
  • postman exported api

Setup

To get this repository, run the following command inside your git enabled terminal

git clone https://github.com/alibigdeli/Django-Car-Tracker-App

Getting ready

Create an enviroment in order to keep the repo dependencies seperated from your local machine.

python -m venv venv

Make sure to install the dependencies of the project through the requirements.txt file.

pip install -r requirements.txt

Once you have installed django and other packages, go to the cloned repo directory and run the following command

python manage.py makemigrations

This will create all the migrations file (database migrations) required to run this App.

Now, to apply this migrations run the following command

python manage.py migrate

options

Project it self has the user creation form but still in order to use the admin you need to create a super user.you can use the createsuperuser option to make a super user.

python manage.py createsuperuser

And lastly let's make the App run. We just need to start the server now and then we can start using our simple todo App. Start the server by following command

python manage.py runserver

Once the server is up and running, head over to http://127.0.0.1:8000 for the App.

Reformat and check

If you want your code to be check by pep8 and all the guide lines, there are two packages added to requirements in order to check and reformat code. you can use it by this command:

black -l 79 . && flake8

Heroku setup

1 - Create an account in heroku

2 - Download and install heroku cli

3 - login to your heroku account

  • you will be redirected to heroku web page to login
heroku login

development

in linux you might run into problem with install psycopg2 and here is a fix to that, just install theses packages and then re install the python package.

Note: i am not sure if you will ran in to problem with windows or not but still linux is good to go.

sudo apt install python3-dev libpq-dev
pip install psycopg2

after installing all dependencies all you have to do is to run the server.

heroku local

or

you can simply run "manage.py runserver" as normal project but dont forget to install dependencies.

production

In order to use this repo for production in heroku service, you have to push the repo to your heroku app.

1- create an app:

heroku create APP_NAME

2- setup git directory for repo (go to your directory)

git init .
git add .

3 - deploy to heroku app

git commit -am "Initial commit"
git push heroku master

Note: you can use the one click deploy on the top of the readme too

Database schema

A simple view of the project model schema.

database schema

Todo

  • add heroku config files
  • complete the documentation
  • add one click deploy mechanism
  • add google api as env to configs
  • test post data on gprs module
  • create a video tutorial

Bugs or Opinion

Feel free to let me know if there are any problems or any request you have for this repo.

django-car-tracker-app's People

Contributors

alibigdeli 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.