urldata = "?su=%s" % su
else:
urldata = ""
- return render_to_response('account/communityauth.html', {
- 'sitename': site.name,
- 'next': '/account/auth/%s/%s' % (siteid, urldata),
- }, NavContext(request, 'account'))
-
+ return authviews.login(request, template_name='account/login.html',
+ authentication_form=PgwebAuthenticationForm,
+ extra_context={
+ 'sitename': site.name,
+ 'next': '/account/auth/%s/%s' % (siteid, urldata),
+ },
+ )
# When we reach this point, the user *has* already been authenticated.
# The request variable "su" *may* contain a suburl and should in that
+++ /dev/null
-{%extends "base/page.html"%}
-{%block contents%}
-<h1>Community authentication</h1>
-<p>
-The website you are trying to log in to ({{sitename}}) is using the
-postgresql.org community login system. In this system you create a
-central account that is used to log into most postgresql.org services.
-Once you are logged into this account, you will automatically be
-logged in to the associated postgresql.org services. Note that this
-single sign on is only used for official postgresql.org websites.
-</p>
-<p>
-If you do not already have an account, you may
-<a href="/account/signup/">sign up</a> for one now.
-If you have one but have lost your
-password, you can use the <a href="/account/reset/">password reset</a> form.
-</p>
-
-<form action="/account/login/" method="post" id="login-form">{% csrf_token %}
- <div class="form-row">
- <label for="id_username">Username:</label> <input type="text" name="username" id="id_username" />
- </div>
- <div class="form-row">
- <label for="id_password">Password:</label> <input type="password" name="password" id="id_password" />
- <input type="hidden" name="this_is_the_login_form" value="1" />
- <input type="hidden" name="next" value="{{next}}" />
- </div>
- <div class="submit-row">
- <label> </label><input type="submit" value="Log in" />
- </div>
-</form>
-
-<script type="text/javascript">
-document.getElementById('id_username').focus()
-</script>
-
-{%endblock%}
-
{%block contents%}
<h1>Log in</h1>
<p>
-Please log in to your community account to reach this area. If you do not already have an account,
+{%if sitename%}
+The website you are trying to log in to ({{sitename}}) is using the
+postgresql.org community login system. In this system you create a
+central account that is used to log into most postgresql.org services.
+Once you are logged into this account, you will automatically be
+logged in to the associated postgresql.org services. Note that this
+single sign on is only used for official postgresql.org websites.
+{%else%}
+Please log in to your community account to reach this area.
+{%endif%}
+</p>
+<p>
+If you do not already have an account,
you may <a href="/account/signup/">sign up</a> for one now. If you have one but have lost your
password, you can use the <a href="/account/reset/">password reset</a> form.
</p>