- Setup a virtual environment.
- Fork the repository for Django REST Task 3 in JoinCODED’s Github and Clone it.
- Install the packages from the requirements file.
- Create a login api. This will help.
- Create a
URL
with namelogin
. - Replace the api in the frontends
login_view
view with this api.
- 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 who is creating the booking should get assigned as theuser
. - Create a
URL
with namebook-flight
for this view and test it inpostman
. - Replace the api in the frontends
book
view with this api.
- Push your code
nbalissa / rest_task_03 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from joincoded/task-django-m8-login-view