diff --git a/account/views.py b/account/views.py index 3206acf..71efa92 100644 --- a/account/views.py +++ b/account/views.py @@ -15,7 +15,7 @@ class LoginView(View): return render(request, self.template_name, {'form': form}) def post(self, request): - + form = LoginForm(data=request.POST) if form.is_valid(): user = form.get_user() @@ -43,7 +43,7 @@ class RegisterView(View): else: messages.error(request, "Registration failed") return render(request, self.template_name, {'form': form}) - + class LogoutView(View): @method_decorator(login_required) @@ -52,3 +52,8 @@ class LogoutView(View): messages.success(request, "Logout successful") return redirect('login') + +from django.shortcuts import render + +def index(request): + return render(request, 'pages/index.html') \ No newline at end of file diff --git a/manhan/urls.py b/manhan/urls.py index fb95cb4..30b9061 100644 --- a/manhan/urls.py +++ b/manhan/urls.py @@ -16,8 +16,9 @@ Including another URLconf """ from django.contrib import admin from django.urls import path, include - +from account.views import index urlpatterns = [ + path('', index, name='home'), # Home page URL path('account/', include('account.urls')), # Include the URLs from the account app path('admin/', admin.site.urls), ]