Metadata-Version: 2.4
Name: django-rentals
Version: 0.1.0
Summary: A Django Rest API for rental (vehicle/gear) listings, availability, and bookings.
Home-page: https://github.com/DestinationPak/django-rentals
Author: Awais Jibran
Author-email: awaisdar001@gmail.com
License: MIT
Keywords: Django rentals
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: Django<6.0,>=5.2
Requires-Dist: Pillow>=10.0.0
Requires-Dist: djangorestframework<3.17,>=3.16
Requires-Dist: setuptools>=80.9.0
Requires-Dist: django-filter>=23.2
Requires-Dist: mysqlclient>=2.2.1
Requires-Dist: drf-spectacular>=0.28.0
Provides-Extra: dev
Requires-Dist: pylint-plugin-utils==0.9.0; extra == "dev"
Requires-Dist: pytest-django==4.12.0; extra == "dev"
Requires-Dist: docutils==0.23; extra == "dev"
Requires-Dist: Faker==40.31.0; extra == "dev"
Requires-Dist: pytest==9.1.1; extra == "dev"
Requires-Dist: pylint==4.0.6; extra == "dev"
Requires-Dist: pylint-django==2.8.0; extra == "dev"
Requires-Dist: pytest-cov==7.1.0; extra == "dev"
Requires-Dist: factory-boy==3.3.3; extra == "dev"
Requires-Dist: ddt==1.7.2; extra == "dev"
Requires-Dist: pre-commit==4.0.1; extra == "dev"
Requires-Dist: twine==6.2.0; extra == "dev"
Requires-Dist: isort==8.0.1; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Django Rentals API

A Django REST API for vehicle/gear rental operators, listings, availability, and bookings —
the sibling package to [django-trips](https://pypi.org/project/django-trips/), part of the
[DestinationPak](https://destinationpak.com) platform.

## Installation

```bash
pip install django-rentals
```

## Usage

Add the app to your installed apps:

```python
INSTALLED_APPS = [
    ...
    'django_rentals',
]
```

## Migrate

```bash
python manage.py migrate
```

Mount its urls under a namespace of your choosing:

```python
urlpatterns = [
    ...
    path('rentals/', include('django_rentals.urls')),
]
```

This mounts the whole app under your own chosen prefix (`rentals/` above) with the lib's
own `v1/` version underneath it, e.g. `rentals/v1/listings/`,
`rentals/v1/schema/redoc/`. The app versions itself independently of your project's own
API version.

## Domain model

`RentalOperator` (the tenant/owner entity, mirrors `django_trips.Host`) → `RentalListing`
(one bookable vehicle or gear kit, mirrors `Trip`) → `RentalAvailability` (a bookable date,
mirrors `TripSchedule`) → `RentalBooking` (mirrors `TripBooking`, but books a
`start_date`/`end_date` range rather than a single departure date).

There is deliberately no separate tier/package model the way `django_trips` has
`TripPackage` — a distinct `RentalListing` per vehicle/kit already serves that purpose.

Like `django_trips`, this package is tenancy-oblivious: it has no concept of which user is
allowed to manage a given `RentalOperator`. That authorization layer belongs to whichever
project installs this app (see destipak's `docs/multi-tenancy-design.md` for the pattern
this is meant to plug into).

## Development

All development happens inside Docker (`make dev.up`, `make update_db`, `make test`,
`make random_rentals`) — see the Makefile (`make help` lists every target).
