Skip to content

Commit 5549088

Browse files
committed
With the complications caused by the TransactionMiddleware gone, we can use Django's default login() and logout() views.
- Legacy-Id: 7539
1 parent 29fe2e8 commit 5549088

5 files changed

Lines changed: 6 additions & 18 deletions

File tree

ietf/ietfauth/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Copyright The IETF Trust 2007, 2009, All Rights Reserved
22

33
from django.conf.urls import patterns, url
4-
from django.contrib.auth.views import login
4+
from django.contrib.auth.views import login, logout
55

66
urlpatterns = patterns('ietf.ietfauth.views',
77
url(r'^$', 'index', name='account_index'),
88
# url(r'^login/$', 'ietf_login'),
99
url(r'^login/$', login),
10-
url(r'^logout/$', 'logout_view'),
11-
url(r'^loggedin/$', 'ietf_loggedin'),
12-
url(r'^loggedout/$', 'logged_out'),
10+
url(r'^logout/$', logout),
11+
# url(r'^loggedin/$', 'ietf_loggedin'),
12+
# url(r'^loggedout/$', 'logged_out'),
1313
url(r'^profile/$', 'profile'),
1414
# (r'^login/(?P<user>[a-z0-9.@]+)/(?P<passwd>.+)$', 'url_login'),
1515
url(r'^testemail/$', 'test_email'),

ietf/ietfauth/views.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,3 @@ def test_email(request):
260260
r.set_cookie("testmailcc", cookie)
261261

262262
return r
263-
264-
def logout_view(request):
265-
try:
266-
logout(request)
267-
return HttpResponseRedirect('/accounts/loggedout/')
268-
except Warning as w:
269-
from ietf.utils.log import log
270-
log(w)
271-
return HttpResponseRedirect('/accounts/loggedout/')
272-
273-
def logged_out(request):
274-
return render_to_response('registration/loggedout.html', {'next':'/'}, context_instance=RequestContext(request))

ietf/templates/registration/change_password.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h1>Change password</h1>
88
{% if success %}
99
<p>Your password has been updated.</p>
10-
<p>Now you can <a href="{% url "ietfauth.views.ietf_login" %}">sign in</a></p>
10+
<p>Now you can <a href="/accounts/login/">sign in</a></p>
1111
{% else %}
1212
<p>Hello, you can select a new password below for your user {{ username }}.</p>
1313
<form action="" method="post">{% csrf_token %}

ietf/templates/registration/confirm.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h1>Confirm account creation</h1>
88
{% if success %}
99
<p>Your account with login name '{{ email }}' has been created, using the password you have selected.</p>
10-
<p>Now you can <a href="{% url "ietfauth.views.ietf_login" %}">sign in</a></p>
10+
<p>Now you can <a href="/accounts/login/">sign in</a></p>
1111
{% else %}
1212
<p>In order to complete the setup of your account with login name '{{ email }}', please set a password:</p>
1313
<form action="" method="post">{% csrf_token %}
File renamed without changes.

0 commit comments

Comments
 (0)