An Django Rest API for fetching and creating trips and their schedules.
Project description
Django Trips API
This is a Django Rest API for fetching and creating trips and schedules.
Installation
Simply do:
pip install django-trips
Setup
- Kick the docker build using
make build
. This can take sometime. - Migrate database. Once the build has been completed, spin up the docker and migrate the database.
> make run
> make shell
> make update_db
- Create a superuser with username
admin
.
> make shell
> python manage.py createsuperuser
- Create batch of trips
make new_trips
. This will create random (100) trips
> python manage.py new_trips
OR
> make new_trips
Api
The following pages are served in the development:
Page | Method | URL |
---|---|---|
Trips List | GET | http://localhost:8000/trips/api/trips |
Docker Commands
Run server
make run
Server logs
make logs
Attach container
make attach
Stop Container
make stop
Destroy
caution, this will remove all your data.
make destory
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-trips-0.2.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for django_trips-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dc5765db805258947b6715169b16cb48b1749a3f0e822fe35d54205f2d30fac |
|
MD5 | 94dcf94f5a8b4b5e1d401f0a8b6e1fe0 |
|
BLAKE2b-256 | ced0e89efe7bfbdb8dbae8087091cf7bdaff16a8b5f31faa6f64d9aa6c05a913 |