]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/openidauth/consumer.py
Remove ADMIN_MEDIA_PREFIX since it has been deprecated in Django 1.4
[osqa.git] / forum_modules / openidauth / consumer.py
index aa24a36c69ba77bf341f9c1c635fd82106baf818..2605587e3badf942a2289b4b3d96fcac807b029c 100644 (file)
@@ -4,7 +4,6 @@ import re
 
 from django.utils.encoding import smart_unicode
 from django.utils.html import escape
 
 from django.utils.encoding import smart_unicode
 from django.utils.html import escape
-from django.http import get_host
 
 from forum.authentication.base import AuthenticationConsumer, InvalidAuthentication
 import settings
 
 from forum.authentication.base import AuthenticationConsumer, InvalidAuthentication
 import settings
@@ -32,7 +31,8 @@ class OpenIdAbstractAuthConsumer(AuthenticationConsumer):
     sreg_attributes = {
         "required": {
             "email": "email",
     sreg_attributes = {
         "required": {
             "email": "email",
-            "nickname": "username"
+            "nickname": "username",
+            "fullname": "real_name"
         }
     }
 
         }
     }
 
@@ -164,8 +164,8 @@ def get_url_host(request):
         protocol = 'https'
     else:
         protocol = 'http'
         protocol = 'https'
     else:
         protocol = 'http'
-    host = escape(get_host(request))
+    host = escape(request.get_host())
     return '%s://%s' % (protocol, host)
 
 def get_full_url(request):
     return '%s://%s' % (protocol, host)
 
 def get_full_url(request):
-    return get_url_host(request) + request.get_full_path()
\ No newline at end of file
+    return get_url_host(request) + request.get_full_path()