Skip to content

unosmartmobility/djreservation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django reservation system

  • Customizable reservations (you can provide your own reservation model)

    https://github.com/luisza/djreservation/blob/master/demo/img/ReserveObject.png?raw=true
  • Generic reservation create view and reserve product view

    https://github.com/luisza/djreservation/blob/master/demo/img/creating_reservation.png?raw=true
  • Reservation list filter by user

    https://github.com/luisza/djreservation/blob/master/demo/img/userreservationlist.png?raw=true
  • Email notifications with template system

  • Django Admin backend for administrative proposuse like Accept, Borrow, Denied reservations

  • Parcial reservations in admin (Not all products can be borrowed)

    https://github.com/luisza/djreservation/blob/master/demo/img/ReservationAdmin.png?raw=true
  • UI based on Twitter Bootstrap

  • Using i18n to handle translations

Documentation

See in readthedocs.io

Installation

Install with pip

$ pip install django-reservation

In settings.py

Set "djreservation" in your INSTALLED_APPS.

Set 'djreservation.middleware.ReservationMiddleware' in MIDDLEWARE

MIDDLEWARE = [
                ...
        'djreservation.middleware.ReservationMiddleware'
]

Configure your email settings

DEFAULT_FROM_EMAIL = "[email protected]"
EMAIL_HOST = "localhost"
EMAIL_PORT = "1025"

Configure database

Run migrations

python manage.py migrate

In your code

Where you want, create a view for reserve a product

from djreservation.views import ProductReservationView

class MyObjectReservation(ProductReservationView):
        base_model = MyObject     # required
        amount_field = 'quantity' # required
        extra_display_field = ['measurement_unit'] # not required

In urls.py

Append django reservation to urlpatterns

from djreservation import urls as djreservation_urls

urlpatterns = [
        ...
        url(r"^reservation/create/(?P<modelpk>\d+)$", MyObjectReservation.as_view())
]
urlpatterns += djreservation_urls.urlpatterns

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.9%
  • HTML 19.1%