diff --git a/main/templates/main.html b/main/templates/main.html
index 34107f7..0cdf496 100644
--- a/main/templates/main.html
+++ b/main/templates/main.html
@@ -126,6 +126,8 @@
Sesi terakhir login: {{ last_login }}
Price |
Description |
Date Added |
+ Edit Product |
+ Delete |
`
products.forEach((item) => {
htmlString += `\n
@@ -133,6 +135,8 @@ Sesi terakhir login: {{ last_login }}
${item.fields.price} |
${item.fields.description} |
${item.fields.date_added} |
+ |
+ |
`
})
diff --git a/main/views.py b/main/views.py
index 394fd5d..e844f31 100644
--- a/main/views.py
+++ b/main/views.py
@@ -22,7 +22,7 @@ def show_main(request):
'name': request.user.username,
'class': 'PBP E',
'products': products,
- 'last_login': request.COOKIES['last_login']
+ 'last_login': request.COOKIES.get('last_login')
}
return render(request, "main.html", context)