From 9d859f4ffc836d4f3c223686c7cb5bec0f9078e9 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 25 Aug 2019 22:35:03 +0200 Subject: [PATCH] add login functionality --- .../inventory/templates/registration/login.html | 11 +++++++++++ network_inventory/inventory/urls.py | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 network_inventory/inventory/templates/registration/login.html diff --git a/network_inventory/inventory/templates/registration/login.html b/network_inventory/inventory/templates/registration/login.html new file mode 100644 index 0000000..d7f67e3 --- /dev/null +++ b/network_inventory/inventory/templates/registration/login.html @@ -0,0 +1,11 @@ +{% extends 'inventory/base.html' %} + +{% block section_title %}Login{% endblock %} + +{% block content %} +
+ {% csrf_token %} + {{ form.as_p }} + +
+{% endblock %} diff --git a/network_inventory/inventory/urls.py b/network_inventory/inventory/urls.py index dc6ad7c..2cf59c3 100644 --- a/network_inventory/inventory/urls.py +++ b/network_inventory/inventory/urls.py @@ -1,8 +1,9 @@ -from django.urls import path +from django.urls import path, include from . import views urlpatterns = [ + path('accounts/', include('django.contrib.auth.urls')), path('', views.customers_table_view, name='customers'), path('customer//', views.CustomerDetailView.as_view(), name='customer'),