Assignment 3: Forms and Data Delivery Implementation in Django
Platform-Based Programming (CSGE602022) — Organized by the Faculty of Computer Science Universitas Indonesia, Odd Semester 2024/2025
Assignment Description
In this assignment, you have to implement the data delivery concept and apply several concepts learned in the tutorial.
Checklists for this assignment are:
- Create a
form
input to add a model object to the previous app. - Add 4
views
to view the added objects in XML, JSON, XML by ID, and JSON by ID formats. - Create URL routing for each of the views added in point 2.
- Answer the following questions in
README.md
in the root folder.- Explain why we need data delivery in implementing a platform.
- In your opinion, which is better, XML or JSON? Why is JSON more popular than XML?
- Explain the functional usage of
is_valid()
method in Django forms. Also explain why we need the method in forms. - Why do we need
csrf_token
when creating a form in Django? What could happen if we did not usecsrf_token
on a Django form? How could this be leveraged by an attacker? - Explain how you implemented the checklist above step-by-step (not just following the tutorial).
- Access the four URLs in point 2 using Postman, take screenshots of the results in Postman, and add them to
README.md
. - Perform
add
-commit
-push
to GitHub.
Deadline
The deadline for Assignment 3 is Wednesday, 18th September, 2024, at 12:00 p.m.
We will check the last commit of the lab assignment repository, so you do not need to submit the repository link separately.