from django.http import HttpResponse from pprint import pformat from django.utils.html import escape def index(request): s = [] if request.openid: s.append('

You are signed in as %s' % escape( str(request.openid) )) if request.openid.is_iname: s.append(' (an i-name)') s.append('

') if request.openid.sreg: s.append('

sreg data: %s

' % escape(str(request.openid.sreg))) if len(request.openids) > 1: s.append('

Also signed in as %s

' % ', '.join([ escape(str(o)) for o in request.openids[:-1] ])) s.append('Sign in with OpenID') s.append(' | ') s.append('Sign in with OpenID using simple registration') s.append(' | ') s.append('Sign in with OpenID, testing ?next= param') if request.openid: s.append(' | Sign out') s.append('

') return HttpResponse('\n'.join(s)) def next_works(request): return HttpResponse('?next= bit works. Home')