This repository has been archived by the owner on Aug 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a login form and REGISTER_URL
- Loading branch information
Paul Craciunoiu
committed
May 26, 2010
1 parent
66c2c5c
commit 26e2d76
Showing
7 changed files
with
65 additions
and
14 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 |
---|---|---|
@@ -1,11 +1,6 @@ | ||
from django.conf import settings | ||
|
||
|
||
def title(request): | ||
"""Adds site title to the context.""" | ||
return {'SITE_TITLE': settings.SITE_TITLE} | ||
|
||
|
||
def auth(request): | ||
"""Adds auth-related urls to the context.""" | ||
return {'LOGIN_URL': settings.LOGIN_URL, 'LOGOUT_URL': settings.LOGOUT_URL} | ||
def global_settings(request): | ||
"""Adds settings to the context.""" | ||
return {'settings': settings} |
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
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
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,33 @@ | ||
{# vim: set ts=2 et sts=2 sw=2: #} | ||
{% block login %} | ||
|
||
<div id="login-form"> | ||
<h3>{{ _('Log in') }}</h3> | ||
|
||
{# TODO: Use reverse for the login url once it's off TikiWiki #} | ||
<form action="https://{{ request.META['HTTP_HOST'] }}{{ settings.LOGIN_URL }}" method="POST"> | ||
<label for="id_username">{{ _('Username:') }}</label> | ||
<input type="text" id="id_username" name="user"/> | ||
|
||
<label for="id_password">{{ _('Password:') }}</label> | ||
<input type="password" id="id_password" name="pass"/> | ||
|
||
<label for="id_remember"> | ||
<input type="checkbox" value="on" id="id_remember" name="rme"> | ||
{{ _('Remember me') }} | ||
</label> | ||
|
||
<div> | ||
<input type="submit" name="login" value="{{ _('Log in') }}"/> | ||
</div> | ||
|
||
[ <a title="{{ _('Click here to register') }}" href="{{ settings.REGISTER_URL }}"> | ||
{{ _('Register') }} | ||
</a> | ||
| <a title="{{ _("Click here if you've forgotten your password") }}" href="/tiki-remind_password.php">{{ _('I forgot my password') }}</a> ] | ||
|
||
<input type="hidden" value="y" name="stay_in_ssl_mode"/> | ||
</form> | ||
</div>{# /login-form #} | ||
|
||
{% endblock %} |
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