diff --git a/biscuit/core/templates/core/base.html b/biscuit/core/templates/core/base.html index c209dc65300ed087cc6a974c32bbc753d9948bbe..f0079227c5b356eec1f4ea65b8f99176517960b2 100644 --- a/biscuit/core/templates/core/base.html +++ b/biscuit/core/templates/core/base.html @@ -34,7 +34,7 @@ <div class="container"> <h1>{% block page_title %}{% endblock %}</h1> <div class="row"> - {% block inner_content %}{% endblock %} + {% block content %}{% endblock %} </div> </div> {% endblock %} diff --git a/biscuit/core/templates/core/index.html b/biscuit/core/templates/core/index.html index 5a082b89d6282e67992f16f2f9507c95dd58ae8c..3a786a7c00e060a2694a9b9340c8c1a7e3f806cb 100644 --- a/biscuit/core/templates/core/index.html +++ b/biscuit/core/templates/core/index.html @@ -3,7 +3,7 @@ {% block page_title %}{% blocktrans %}BiscuIT School Information System (SIS) - Next Generation Platform{% endblocktrans %}{% endblock %} -{% block inner_content %} +{% block content %} <div class="jumbotron"> <p> {% blocktrans %} diff --git a/biscuit/core/templates/registration/login.html b/biscuit/core/templates/registration/login.html new file mode 100644 index 0000000000000000000000000000000000000000..542acd50117b6bfb7fda2601b668ea3c3ff987e6 --- /dev/null +++ b/biscuit/core/templates/registration/login.html @@ -0,0 +1,22 @@ +{% extends "core/base.html" %} +{% load bootstrap3 %} + +{% block content %} + {% if next %} + {% if user.is_authenticated %} + <p> + Your account doesn't have access to this page. To proceed, + please login with an account that has access. + </p> + {% else %} + <p>Please login to see this page.</p> + {% endif %} + {% endif %} + + <form method="post" action="{% url 'login' %}"> + {% csrf_token %} + {% bootstrap_form form %} + <input type="submit" value="Login" /> + <input type="hidden" name="next" value="{{ next }}"> + </form> +{% endblock %} diff --git a/biscuit/core/urls.py b/biscuit/core/urls.py index b5c349d813ce818fa47b2ea981dc07b56107cf9a..2e1336b70e3906a415b1bf4296f0e464f90dfb4d 100644 --- a/biscuit/core/urls.py +++ b/biscuit/core/urls.py @@ -7,6 +7,7 @@ from . import views urlpatterns = [ path('admin/', admin.site.urls), + path('accounts/', include('django.contrib.auth.urls')), path('', views.index, name='index'), ]