From 611f3017c00dd9a220402489602defab66f2c9f0 Mon Sep 17 00:00:00 2001 From: spl3g Date: Sun, 31 May 2026 16:12:10 +0300 Subject: add login and products views --- core/views.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'core/views.py') diff --git a/core/views.py b/core/views.py index 91ea44a..6957abc 100644 --- a/core/views.py +++ b/core/views.py @@ -1,3 +1,13 @@ from django.shortcuts import render +from django.views.generic import ListView +from django.contrib.auth.views import LoginView -# Create your views here. +from .models import Product + +class UserLoginView(LoginView): + template_name = "core/login.html" + +class ProductListView(ListView): + model = Product + template_name = "core/product_list.html" + context_object_name = "products" -- cgit v1.2.3