add login function

This commit is contained in:
2017-02-04 06:20:46 +01:00
parent 47ba4b0b67
commit 19719a68b9
4 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
{% extends 'billard/base.html' %}
{% load crispy_forms_tags %}
{% block title %}Login{% endblock %}
{% block content %}
<form action="{% url "login" %}" method="post" accept-charset="utf-8">
{% csrf_token %}
{{ form|crispy }}
<input type="hidden" name="next" value="{{ next }}" />
<input class="btn btn-default" type="submit" value="Login" />
</form>
{% endblock %}

View File

@@ -9,7 +9,7 @@ router.register(r'tables', views.TableViewSet)
router.register(r'location_data', views.LocationDataViewSet)
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^$', views.index, name='carom_index'),
#url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^(?P<pk>[0-9]+)/$', views.LocationDataDetailView.as_view(), name='detail'),
url(r'api/v1/', include(router.urls)),