Demo projec that allows us to rent transport, payment is in cash and calculate the change in the lower quantity of paper money to give
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
git clone https://github.com/walterpk78/test_rent
Django-1.10.3, python-2.7.5, django-tables2, psycopg2, selenium(optiona for testing frontend), unittest(optional testing backend)
Django==1.10.3
django-tables2==1.2.6
pkg-resources==0.0.0
psycopg2==2.6.2
Installing a virtualenv (optional)
virtualenv virtalenv/renting
Installing packages from requirements.txt
pip install -r requirements.txt
Database preparation(mandatory): open settings.py set your database credentials and then create database
postgres=# create role rent;
postgres=# create database rent owner by rent;
postgres=# \c rent
rent=# create schema rent;
give permissions with GRANT as your desire
example database insertion of different renting transports
insert into rentomatic_transport (id, transport_type, description, price_per_day, km, rented, rented_until ) VALUES (3,2,'Luxury car, very confortable, nice looking', 10000, 1500, False, NULL);
insert into rentomatic_transport (id, transport_type, description, price_per_day, km, rented, rented_until ) VALUES (2,2,'Good family car, nice condition, ready to discover new places', 100, 150, False, NULL);
insert into rentomatic_transport (id, transport_type, description, price_per_day, km, rented, rented_until ) VALUES (1,1,'Best bike ever, good breakes, not heavy and good red color', 100, 150, False, NULL);
run django migrations
cd renting
python manage.py migrate
python manage.py makemigrations
Logs files: we recommend creating separated logs as example in settings.py, but in the demo we use api.log
touch LOGS/api.log
open a web browser and point it to your port(optional for tensting)
# python manage.py runserver localhost:8080
This is a normal django app you can use any deployment system like Jenkins
Please read [CONTRIBUTING.md] for details on our code of conduct, and the process for submitting pull requests to us.
- Walter Kuhn - Initial work - PurpleBooth
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone who's code was used
- Inspiration
- etc