Assignment 4: Implementing Authentication, Session, and Cookies 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 be implementing the authentication, session, cookies, as well as several other concepts that you have learned during tutorial sessions.
Assignment Checklist
The checklist for this assignment is as follows:
- Implementing register, login, and logout functions that allow user to access the application based on their login/logout status.
- Create two (2) user accounts each having three (3) dummy datas of the models that was previously made for each account in local.
- Connect the
Product
model with theUser
model. - Show the logged in user's detailed information such as username, as well as implement cookies such as
last_login
on the application's home page. - Answer the following questions in the
README.md
file under the root folder (you can modify theREADME.md
file that you have made previously; add a subtitle for each assignment.).- What is Django's
AuthenticationForm
? Explain its advantages and disadvantages. - What is the difference between authentication and authorization? How does Django implement the two concepts?
- What are the benefits and drawbacks of using sessions and cookies in storing the state of a web application?
- in web development, is the usage of cookies secure by default, or is there any potential risk that we should be aware of? How does Django handle this problem?
- Explain how you implemented the checklist above step-by-step (not just following the tutorial).
- What is Django's
- Run
add-commit-push
to GitHub.
Deadline
The deadline for Assignment 4 is Wednesday, September 24 2025, at 12:00 PM.