-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
56 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ db.sqlite3 | |
__pycache__/ | ||
node_modules/ | ||
bower_components/ | ||
*.mo | ||
*.mo | ||
.cache/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Crispy helpers for athentication forms.""" | ||
from crispy_forms.helper import FormHelper | ||
from crispy_forms.layout import Layout, Submit, Row, Div | ||
from django.utils.translation import ugettext as _ | ||
|
||
login_helper = FormHelper() | ||
login_helper.layout = Layout( | ||
Row( | ||
Div('username', css_class='col-lg-offset-4 col-lg-4') | ||
), | ||
Row( | ||
Div('password', css_class='col-lg-offset-4 col-lg-4') | ||
), | ||
Row( | ||
Div( | ||
# Translators: This is the button text. | ||
Submit('submit', _('Login'), css_class='btn-block'), | ||
css_class='col-lg-offset-4 col-lg-4' | ||
) | ||
), | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends "common/base.html" %} | ||
|
||
{% load i18n %} | ||
{% load crispy_forms_tags %} | ||
|
||
{% block content %} | ||
|
||
{% crispy form helper %} | ||
|
||
{% comment %} | ||
{# Assumes you setup the password_reset view in your URLconf #} | ||
<p><a href="{% url 'accounts:password_reset' %}">Lost password?</a></p> | ||
{% endcomment %} | ||
|
||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.conf.urls import url, include | ||
from django.contrib.auth import views as auth_views | ||
|
||
from bizwiz.account.forms import login_helper | ||
|
||
urlpatterns = [ | ||
url(r'^login/$', auth_views.login, { | ||
'template_name': 'account/login.html', | ||
'extra_context': {'helper': login_helper}, | ||
}, name='login'), | ||
url(r'^logout/$', auth_views.logout, name='logout'), | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,3 +135,6 @@ | |
messages.DEBUG: 'info', | ||
messages.ERROR: 'danger', | ||
} | ||
|
||
LOGIN_REDIRECT_URL = '/' | ||
LOGOUT_REDIRECT_URL = '/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters