Commit 67615bd0b4be99aa58e5b8781492ffd3e696ac0a
Committed by
Sergio Oliveira
1 parent
901deaa2
Exists in
master
and in
39 other branches
Added login template
Showing
3 changed files
with
54 additions
and
1 deletions
Show diff stats
colab/accounts/urls.py
... | ... | @@ -12,6 +12,9 @@ urlpatterns = patterns('', |
12 | 12 | ChangeXMPPPasswordView.as_view(), name='change_password'), |
13 | 13 | |
14 | 14 | url(r'^login/?$', LoginView.as_view(), name='login'), |
15 | +# url(r'^login/?$', 'django.contrib.auth.views.login', name='login'), | |
16 | + | |
17 | +# url(r'^logout/?$', 'accounts.views.logoutColab', name='logout'), | |
15 | 18 | |
16 | 19 | url(r'^(?P<username>[\w@+.-]+)/?$', |
17 | 20 | UserProfileDetailView.as_view(), name='user_profile'), | ... | ... |
colab/static/css/screen.css
... | ... | @@ -0,0 +1,50 @@ |
1 | + | |
2 | +{% extends "base.html" %} | |
3 | +{% load i18n %} | |
4 | +{% block main-content %} | |
5 | + | |
6 | + | |
7 | +<div class="row"> | |
8 | + {% if form.errors %} | |
9 | + <div class="alert alert-danger"> | |
10 | + <b>{% trans "Please correct the errors below and try again" %}</b> | |
11 | + </div> | |
12 | + {% endif %} | |
13 | +</div> | |
14 | + | |
15 | +<br> | |
16 | +<form action="{% url 'login' %}" method="post" role="form" class="form-horizontal signup"> | |
17 | + {% csrf_token %} | |
18 | + | |
19 | + <div class="row"> | |
20 | + <div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-4 col-sm-8 col-sm-offset-2 col-xs-12"> | |
21 | + <div class="panel panel-default"> | |
22 | + <div class="panel-heading"><h3 class="panel-title">{% trans 'Login' %}</h3></div> | |
23 | + | |
24 | + <div class="panel-body"> | |
25 | + <div class="form-group{% if form.username.errors %} alert alert-danger has-error{% endif %}"> | |
26 | + {{ form.username.label_tag }} | |
27 | + <input class="form-control" id="id_username" maxlength="254" name="username" type="text"> | |
28 | + {{ form.username.errors }} | |
29 | + </div> | |
30 | + <div class="form-group{% if form.password.errors %} alert alert-danger has-error{% endif %}"> | |
31 | + {{ form.password.label_tag }} | |
32 | + <input class="form-control" id="id_password" name="password" type="password"> | |
33 | + {{ form.password.errors }} | |
34 | + </div> | |
35 | + </div> | |
36 | + </div> | |
37 | + </div> | |
38 | + </div> | |
39 | + | |
40 | + <div class="row"> | |
41 | + <div class="submit"> | |
42 | + <input type="submit" value="{% trans 'Login' %}" class="btn btn-primary btn-lg btn-block"> | |
43 | + </div> | |
44 | + <p class="text-center"><a>{% trans 'Forgot Password?' %}</a></p> | |
45 | + </div> | |
46 | + | |
47 | +</form> | |
48 | + | |
49 | +{% endblock %} | |
50 | + | ... | ... |