def userpage(request, uid): #Check whether this is a YADIS request if checkYadisRequest(request): return useryadis(request, uid) user = get_object_or_404(DjangoidUser.objects, djangouser = uid) user.attributes = user.get_attributes(True) mid = microid(user.get_user_page(), user.get_user_page()) res = render_to_response("users/userpage.html", {"server_url": settings.BASE_URL[:-1] + urlreverse("djangoid.server.views.endpoint"), "user": user, "microid": mid}) res["X-XRDS-Location"] = user.get_yadis_uri() return res
def get_microids(self): return [microid(self.get_contact_uri(), self.uri), microid("mailto:" + self.user.get_djangouser().email, self.uri)]