diff --git a/PDMI/PDMI/urls.py b/PDMI/PDMI/urls.py index df3e170..3bb0efd 100644 --- a/PDMI/PDMI/urls.py +++ b/PDMI/PDMI/urls.py @@ -19,6 +19,7 @@ import store, front, doc urlpatterns = [ path('admin/', admin.site.urls), + path('accounts/', include('django.contrib.auth.urls')), path('', include('front.urls'), name='front'), path('store/', include('store.urls'), name='store'), path('doc/', include('doc.urls'), name='doc'), diff --git a/PDMI/store/templates/store/store-navbar.html b/PDMI/store/templates/store/store-navbar.html index 454cea2..1f6ce23 100644 --- a/PDMI/store/templates/store/store-navbar.html +++ b/PDMI/store/templates/store/store-navbar.html @@ -1,40 +1,43 @@ {% extends "base/navbar.html" %} -{% block 'navbar-right' %} -{% if user.is_authenticated %} - -{% else %} - -{% endif %} -{% endblock 'navbar-right' %} +{% block navbar-right %} + {% if user.is_authenticated %} + + {% else %} + + {% endif %} +{% endblock %} diff --git a/PDMI/store/urls.py b/PDMI/store/urls.py index 6c7dc75..406becf 100644 --- a/PDMI/store/urls.py +++ b/PDMI/store/urls.py @@ -20,8 +20,8 @@ from . import views urlpatterns = [ path('', TemplateView.as_view(template_name='store/index.html'), name='store_front_page'), - path('login/', views.CustomLoginView.as_view(), name='login'), - path('signup/', views.SignUpView.as_view(), name='signup'), - path('logout/', LogoutView.as_view(), name='logout'), + path('login/', views.CustomLoginView.as_view(), name='login_modal'), + path('signup/', views.SignUpView.as_view(), name='signup_modal'), + #path('logout/', LogoutView.as_view(), name='logout'), path('upload/', views.UploadView.as_view(), name='upload'), ] diff --git a/PDMI/templates/base/base.html b/PDMI/templates/base/base.html index e3d42a5..f873236 100644 --- a/PDMI/templates/base/base.html +++ b/PDMI/templates/base/base.html @@ -12,21 +12,30 @@ + integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" + crossorigin="anonymous"> - + - - + + {% block extra_static %}{% endblock extra_static %} - {% block navbar %} - {% include "base/navbar.html" %} - {% endblock navbar %} +{% block navbar %} + {% include "base/navbar.html" %} +{% endblock navbar %} +
{% block body %} {% endblock %} +
+{% block footer %} {% include "base/legal.html" %} +{% endblock %} diff --git a/PDMI/templates/base/navbar.html b/PDMI/templates/base/navbar.html index fb33bb8..3e5bc15 100644 --- a/PDMI/templates/base/navbar.html +++ b/PDMI/templates/base/navbar.html @@ -1,6 +1,7 @@ diff --git a/PDMI/templates/registration/login.html b/PDMI/templates/registration/login.html new file mode 100644 index 0000000..4bb5a9e --- /dev/null +++ b/PDMI/templates/registration/login.html @@ -0,0 +1,55 @@ +{% extends 'base/base.html' %} + +{% block extra_static %} + +{% endblock %} + +{% block body %} +
+
+
+

Login

+ {% if form.errors %} +

Your username and password didn't match. Please try again.

+ {% endif %} + + {% if next %} + {% if user.is_authenticated %} +

Your account doesn't have access to this page. To proceed, + please login with an account that has access.

+ {% else %} +

Please login to see this page.

+ {% endif %} + {% endif %} + +
+ {% csrf_token %} +
+ + +
+ +
+ + + Forgot? +
+ + +
+
+
+
+{% endblock %} + +{% block footer %} +{% endblock %} \ No newline at end of file