Skip to content

Commit

Permalink
add: tutorial 3
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenluthfi committed Sep 18, 2024
1 parent 91cccf9 commit 309ea12
Show file tree
Hide file tree
Showing 17 changed files with 1,399 additions and 7 deletions.
4 changes: 2 additions & 2 deletions assignments/individual/assignment-2.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_label: Tugas 2
sidebar_position: 1
Path: docs/tugas-2
sidebar_position: 2
Path: assignments/individual/assignment-2
---

# Tugas 2: Implementasi *Model-View-Template* (MVT) pada Django
Expand Down
2 changes: 1 addition & 1 deletion assignments/individual/assignment-3.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_label: Tugas 3
sidebar_position: 3
Path: docs/tugas-3
Path: assignments/individual/assignment-3
---

# Tugas 3: Implementasi Form dan Data Delivery pada Django
Expand Down
36 changes: 36 additions & 0 deletions assignments/individual/assignment-4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
sidebar_label: Tugas 4
sidebar_position: 4
Path: assignments/individual/assignment-4
---

# Tugas 4: Implementasi Autentikasi, Session, dan Cookies pada Django

Pemrograman Berbasis Platform (CSGE602022) — diselenggarakan oleh Fakultas Ilmu Komputer Universitas Indonesia, Semester Ganjil 2024/2025

---

## Deskripsi Tugas

Pada tugas ini, kamu akan mengimplementasikan konsep *authentication*, *session*, *cookies*, serta menerapkan beberapa konsep yang telah dipelajari selama sesi tutorial.

*Checklist* untuk tugas ini adalah sebagai berikut:

- [ ] Mengimplementasikan fungsi registrasi, login, dan logout untuk memungkinkan pengguna untuk mengakses aplikasi sebelumnya dengan lancar.
- [ ] Membuat **dua** akun pengguna dengan masing-masing **tiga** *dummy data* menggunakan model yang telah dibuat pada aplikasi sebelumnya untuk setiap akun **di lokal**.
- [ ] Menghubungkan model `Product` dengan `User`.
- [ ] Menampilkan detail informasi pengguna yang sedang *logged in* seperti *username* dan menerapkan `cookies` seperti `last login` pada halaman utama aplikasi.
- [ ] Menjawab beberapa pertanyaan berikut pada `README.md` pada *root folder* (silakan modifikasi `README.md` yang telah kamu buat sebelumnya; tambahkan subjudul untuk setiap tugas).

- [ ] Apa itu Django `UserCreationForm`, dan jelaskan apa kelebihan dan kekurangannya?
- [ ] Apa perbedaan antara autentikasi dan otorisasi dalam konteks Django, dan mengapa keduanya penting?
- [ ] Apa itu *cookies* dalam konteks aplikasi web, dan bagaimana Django menggunakan *cookies* untuk mengelola data sesi pengguna?
- [ ] Apakah penggunaan *cookies* aman secara *default* dalam pengembangan web, atau apakah ada risiko potensial yang harus diwaspadai?
- [ ] Jelaskan bagaimana cara kamu mengimplementasikan *checklist* di atas secara *step-by-step* (bukan hanya sekadar mengikuti tutorial).
- [ ] Melakukan `add`-`commit`-`push` ke GitHub.

## Tenggat Waktu Pengerjaan

Tenggat waktu pengerjaan Tugas 4 adalah **Rabu, 25 September 2023, pukul 12.00 siang**.

Asisten dosen akan mengecek *last commit* dari repositori tugas lab, sehingga kamu tidak perlu mengumpulkan tautan repositori ke dalam slot submisi.
2 changes: 1 addition & 1 deletion docs/tutorial-2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: Tutorial 2
sidebar_position: 3
sidebar_position: 4
Path: docs/tutorial-2
---

Expand Down
660 changes: 660 additions & 0 deletions docs/tutorial-3.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_label: Assignment 2
sidebar_position: 1
Path: docs/tugas-2
sidebar_position: 2
Path: assignments/individual/assignment-2
---

# Assignment 2: Model-View-Template (MVT) Implementation on Django
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Path: assignment/individual/assignment-3

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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
sidebar_label: Assignment 4
sidebar_position: 4
Path: assignments/individual/assignment-4
---

# Assignment 4: The Implementation of Authentication, Session, and Cookies 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 are going to implement *authentication*, *session*, and *cookies*, as well as several concepts learned in the tutorial.

Checklists for this assignment are:

- [ ] Implement the register, login, and logout functions so that the user can access the application freely.
- [ ] make **two** user accounts with **three** *dummy data* each, using the model made in the application beforehand so that each data can be accessed by each account **locally**.
- [ ] Connect the models `Product` and `User`.
- [ ] Display *logged in* user details such as *username* and apply `cookies` like `last login` to the application's main page.
- [ ] Answer the following questions in `README.md` in the root folder. (Modify your `README.md` that you have already created; add a subtitle for each assignment).

- [ ] What is a `UserCreationForm`, explain its advantages and disadvantages?
- [ ] What is the difference between authentication and authorization in Django, why are both important?
- [ ] What are *cookies* in web development, and how do Django use *cookies* to manage user sessions?
- [ ] Are the use of *cookies* safe by *default* in web development, or are there risks that needs to be noted?
- [ ] Explain how did you implement the checklist *step-by-step* (apart from following the tutorial).
- [ ] Perform `add`-`commit`-`push` to GitHub.

## Deadline

The deadline for Assignment 4 is **Wednesday, 25th 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.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_label: Tutorial 2
sidebar_position: 3
sidebar_position: 4
Path: docs/tutorial-2
---

Expand Down
Loading

0 comments on commit 309ea12

Please sign in to comment.