summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicky Zhou <ricky@fedoraproject.org>2008-07-23 04:22:10 (GMT)
committerRicky Zhou <ricky@fedoraproject.org>2008-07-23 04:22:10 (GMT)
commita57263aa68b2e8a03be64469557bc160af40d924 (patch)
tree47e52b2492cca475e5931d70bb5afffda8090d10
parent6ea14303bdc6082e1f0bf82b15aadc2cfb5413c1 (diff)
downloadfas-a57263aa68b2e8a03be64469557bc160af40d924.zip
fas-a57263aa68b2e8a03be64469557bc160af40d924.tar.gz
fas-a57263aa68b2e8a03be64469557bc160af40d924.tar.xz
give the option to pass country as well
-rw-r--r--fas/openid_samadhi.py1
-rw-r--r--fas/templates/openid/sreg.xml3
2 files changed, 4 insertions, 0 deletions
diff --git a/fas/openid_samadhi.py b/fas/openid_samadhi.py
index 6816754..1d01816 100644
--- a/fas/openid_samadhi.py
+++ b/fas/openid_samadhi.py
@@ -201,6 +201,7 @@ class OpenID(controllers.Controller):
'email': identity.current.user.email,
'fullname': identity.current.user.human_name,
'timezone': identity.current.user.timezone,
+ 'country': identity.current.user.country_code,
}
for field in [f for f in kw['sreg']['send'] if kw['sreg']['send'] == 'yes']:
diff --git a/fas/templates/openid/sreg.xml b/fas/templates/openid/sreg.xml
index 036f92d..396681a 100644
--- a/fas/templates/openid/sreg.xml
+++ b/fas/templates/openid/sreg.xml
@@ -25,6 +25,9 @@
<span class="stored_information" py:when="field == 'timezone' and tg.identity.user.timezone is not None">
${tg.identity.user.timezone}
</span>
+ <span class="stored_information" py:when="field == 'country' and tg.identity.user.country is not None">
+ ${tg.identity.user.country}
+ </span>
<span class="no_information" py:otherwise="">${_('No information on file')}</span>
</td>
<td py:if="not required">