diff --git a/server/djangoapp/urls.py b/server/djangoapp/urls.py index b170c0750c..220dd9f9eb 100644 --- a/server/djangoapp/urls.py +++ b/server/djangoapp/urls.py @@ -2,7 +2,7 @@ from django.urls import path from django.conf.urls.static import static from django.conf import settings -# from . import views +from . import views from django.views.generic import TemplateView app_name = 'djangoapp' @@ -15,7 +15,7 @@ # # path for registration # path for login - # path(route='login', view=views.login_user, name='login'), + path(route='login', view=views.login_user, name='login'), # path for dealer reviews view diff --git a/server/djangoapp/views.py b/server/djangoapp/views.py index b16409f419..0215dce4fc 100644 --- a/server/djangoapp/views.py +++ b/server/djangoapp/views.py @@ -1,19 +1,19 @@ # Uncomment the required imports before adding the code -# from django.shortcuts import render -# from django.http import HttpResponseRedirect, HttpResponse -# from django.contrib.auth.models import User -# from django.shortcuts import get_object_or_404, render, redirect -# from django.contrib.auth import logout -# from django.contrib import messages -# from datetime import datetime +from django.shortcuts import render +from django.http import HttpResponseRedirect, HttpResponse +from django.contrib.auth.models import User +from django.shortcuts import get_object_or_404, render, redirect +from django.contrib.auth import logout +from django.contrib import messages +from datetime import datetime from django.http import JsonResponse from django.contrib.auth import login, authenticate import logging import json from django.views.decorators.csrf import csrf_exempt -# from .populate import initiate +from .populate import initiate # Get an instance of a logger diff --git a/server/djangoproj/urls.py b/server/djangoproj/urls.py index db65c2ef39..52347473b5 100644 --- a/server/djangoproj/urls.py +++ b/server/djangoproj/urls.py @@ -24,5 +24,6 @@ path('djangoapp/', include('djangoapp.urls')), path('', TemplateView.as_view(template_name="Home.html")), path('about/', TemplateView.as_view(template_name="About.html")), - path('contact/', TemplateView.as_view(template_name="Contact.html")) + path('contact/', TemplateView.as_view(template_name="Contact.html")), + path('login/', TemplateView.as_view(template_name="index.html")), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)