Skip to main content

Assignment 3: Forms and Data Delivery Implementation in Django

Platform-Based Programming (CSGE602022) — Organized by the Faculty of Computer Science Universitas Indonesia, Odd Semester 2025/2026


Assignment Description

In this assignment, you will implement data delivery and apply several concepts you have learned during the tutorial session.

Assignment Checklist

The checklist for this assignment is as follows:

  • Add 4 new views functions to view the added objects in XML, JSON, XML by ID, and JSON by ID formats.
  • Create URL routings for each of the views added in point 1.
  • Create a webpage to display the model object data with an "Add" button that redirects to the form page, and a "Detail" button on each model object data that displays the object's detail page.
  • Create a form page to add model objects to the previous app.
  • Create a webpage that displays the details of each model object data.
  • Answer the following questions in the README.md file in the root folder.
    • Why do we need data delivery in implementing a platform?
    • In your opinion, which is better, XML or JSON? Why is JSON more popular than XML?
    • What is the purpose of the is_valid() method in Django forms, and why do we need it?
    • Why do we need a csrf_token when making forms in Django? What can happen if we don't include a csrf_token in a Django form? How can this be exploited by an attacker?
    • Explain how you implemented the checklist above step-by-step (not just following the tutorial).
    • Do you have any feedback for the teaching assistants for Tutorial 2?
  • Access the four URLs in point 2 using Postman, take screenshots of the URL access results in Postman, and add them to your README.md.
  • Run add-commit-push to GitHub.
info

Tips: For questions involving diagrams or images, you may simply attach links or upload the images to your README.md file.

Deadline

The deadline for Assignment 3 is Wednesday, September 17 2025, at 11:59 a.m.