diff --git a/.gitignore b/.gitignore index ff54842..e965b12 100644 --- a/.gitignore +++ b/.gitignore @@ -119,3 +119,4 @@ dmypy.json .pyre/ # End of https://www.gitignore.io/api/django +.idea/ \ No newline at end of file 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/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 52c03b6..9e87481 100644 --- a/PDMI/templates/base/base.html +++ b/PDMI/templates/base/base.html @@ -43,6 +43,8 @@ {% block body %} {% endblock %} + +{% block footer %} {% include "base/legal.html" %} 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