1. Joseph Turian
  2. django-email-login

Commits

Joseph Turian  committed 779dd25

Use login_form.haml, not login.haml

  • Participants
  • Parent commits bd05073
  • Branches default

Comments (0)

Files changed (6)

File email_login/templates/email_login/generate_html.sh

View file
 hamlpy logged_out.haml > logged_out.html
 hamlpy login_form.haml > login_form.html
-hamlpy login.haml > login.html
 hamlpy password_change_done.haml > password_change_done.html
 hamlpy password_change_form.haml > password_change_form.html
 hamlpy password_reset_complete.haml > password_reset_complete.html

File email_login/templates/email_login/login.haml

-- extends "base.haml"
-
-- block title
-  Login
-  
-- block content
-  - if form.errors
-    %p Authentication error
-  %form{:action => "{% url django.contrib.auth.views.login %}", :method => "post"}
-    - csrf_token
-    - for field in form
-      %p
-        {{ field.label_tag }}: {{ field }}
-        {{ field.errors }}
-    %p
-      %input{:type => "submit", :value => "Login"}/
-    %input{:name => "next", :type => "hidden", :value => "{{ next }}"}/

File email_login/templates/email_login/login.html

-{% extends "base.haml" %}
-{% block title %}
-  Login
-{% endblock %}
-{% block content %}
-  {% if form.errors %}
-    <p>Authentication error</p>
-  {% endif %}
-  <form action='{% url django.contrib.auth.views.login %}' method='post'>
-    {% csrf_token %}
-    {% for field in form %}
-      <p>
-        {{ field.label_tag }}: {{ field }}
-        {{ field.errors }}
-      </p>
-    {% endfor %}
-    <p>
-      <input type='submit' value='Login' />
-    </p>
-    <input type='hidden' name='next' value='{{ next }}' />
-  </form>
-{% endblock %}
-

File email_login/templates/email_login/old/login.haml

View file
+- extends "base.haml"
+
+- block title
+  Login
+  
+- block content
+  - if form.errors
+    %p Authentication error
+  %form{:action => "{% url django.contrib.auth.views.login %}", :method => "post"}
+    - csrf_token
+    - for field in form
+      %p
+        {{ field.label_tag }}: {{ field }}
+        {{ field.errors }}
+    %p
+      %input{:type => "submit", :value => "Login"}/
+    %input{:name => "next", :type => "hidden", :value => "{{ next }}"}/

File email_login/templates/email_login/old/login.html

View file
+{% extends "base.haml" %}
+{% block title %}
+  Login
+{% endblock %}
+{% block content %}
+  {% if form.errors %}
+    <p>Authentication error</p>
+  {% endif %}
+  <form action='{% url django.contrib.auth.views.login %}' method='post'>
+    {% csrf_token %}
+    {% for field in form %}
+      <p>
+        {{ field.label_tag }}: {{ field }}
+        {{ field.errors }}
+      </p>
+    {% endfor %}
+    <p>
+      <input type='submit' value='Login' />
+    </p>
+    <input type='hidden' name='next' value='{{ next }}' />
+  </form>
+{% endblock %}
+

File email_login/urls.py

View file
 our_auth_urls = patterns('',
                        (r'^login/$', 
                         'django.contrib.auth.views.login', 
-                        {'template_name': 'email_login/login.haml',
+                        {'template_name': 'email_login/login_form.haml',
                          'authentication_form': EmailAuthenticationForm}),
 
                        (r'^logout/$',