Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from markmacw/2b-add-login-view
Browse files Browse the repository at this point in the history
tested - login screen visible when clicking link now
  • Loading branch information
markmacw authored Oct 11, 2024
2 parents 3a3c2cc + c97aeff commit 030c390
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions server/djangoapp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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

Expand Down
16 changes: 8 additions & 8 deletions server/djangoapp/views.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion server/djangoproj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 030c390

Please sign in to comment.