Let's secure our views!
- Fork and clone this repository.
- Create a
virtual environment
. - Install the packages using
pip install -r requirements/dev.lock
. - Create a login api. This package will help.
- Create a
URL
with the namelogin
.
- Create a
- Create a
Booking create API view
:- It should use the same serializer as the update view.
- The
flight
should get assigned automatically to the booking. The flight id should be retrieved from the url. - The
user
should get assigned automatically to the booking. The logged in user creating the booking should be assigned as theuser
. - Create a
URL
with the namebook-flight
for this view and test it inpostman
.
- Push your code.