Skip to content

Commit cbd1adc

Browse files
author
tailor
committed
[project @ Django example server tweaks]
1 parent d4f63a0 commit cbd1adc

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎examples/djopenid/server/views.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,12 @@ def showDecidePage(request, openid_request):
161161
idSelect = openid_request.idSelect()
162162
identity = openid_request.identity
163163
trust_root = openid_request.trust_root
164+
default_url = getUserURL(request)
164165

165166
return 'server/trust.html', {'idSelect': idSelect,
166167
'identity': identity,
167-
'trust_root': trust_root,}
168+
'trust_root': trust_root,
169+
'default_url': default_url}
168170

169171
@util.sendResponse
170172
def processTrustResult(request):

‎examples/djopenid/templates/server/trust.html‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@
55
The site <tt>{{ trust_root|escape }}</tt> has requested verification
66
of your OpenID.
77

8+
<div>
89
<form method="post" action="/server/processTrustResult/">
910
{% if idSelect %}
11+
<p>
1012
Because you entered the server URL when authenticating, enter a
1113
username here to return an identity URL of your choice:
1214

15+
<br/>
1316
<input type="text" name="name" size="30" />
17+
(If you omit this, <tt>{{ default_url }}</tt> will be sent instead.)
18+
</p>
1419
{% else %}
1520
Verify your identity to the relying party?
1621
{% endif %}
1722

18-
<input type="submit" value="Yes" name="allow" />
19-
<input type="submit" value="No" name="cancel" />
23+
<br/>
24+
<input type="submit" value="Yes (Allow)" name="allow" />
25+
<input type="submit" value="No (Cancel)" name="cancel" />
2026
</form>
27+
</div>
2128

2229
{% endblock %}

0 commit comments

Comments
 (0)