web/views/euser.py
changeset 619 9efa2cc9c02c
parent 586 09ec2839e447
child 631 99f5852f8604
child 926 6d3d693c0ad5
--- a/web/views/euser.py	Fri Feb 13 14:38:14 2009 +0100
+++ b/web/views/euser.py	Fri Feb 13 15:49:33 2009 +0100
@@ -14,7 +14,6 @@
 from cubicweb.web.form import EntityForm
 from cubicweb.web.views.baseviews import PrimaryView, EntityView
 
-
 class EUserPrimaryView(PrimaryView):
     accepts = ('EUser',)
     skip_attrs = ('firstname', 'surname')
@@ -33,7 +32,6 @@
         return  rschema.type in ['interested_in', 'tags', 
                                  'todo_by', 'bookmarked_by',
                                  ]
-
 class FoafView(EntityView):
     id = 'foaf'
     accepts = ('EUser',)
@@ -42,10 +40,10 @@
     content_type = 'text/xml'
 
     def call(self):
-        self.w(u'<?xml version="1.0" encoding="%s"?>\n' % self.req.encoding)
-        self.w(u'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n')
-        self.w(u'xmlns:rdfs="http://www.w3org/2000/01/rdf-schema#"\n')
-        self.w(u'xmlns:foaf="http://xmlns.com/foaf/0.1/">\n')
+        self.w('''<?xml version="1.0" encoding="%s"?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+         xmlns:rdfs="http://www.w3org/2000/01/rdf-schema#"
+         xmlns:foaf="http://xmlns.com/foaf/0.1/"> '''% self.req.encoding)
         for i in xrange(self.rset.rowcount):
             self.cell_call(i, 0)
         self.w(u'</rdf:RDF>\n')
@@ -70,7 +68,12 @@
             self.w(u'<foaf:mbox>%s</foaf:mbox>\n' % html_escape(emailaddr))
         self.w(u'</foaf:Person>\n')
 
-
+class FoafUsableView(FoafView):
+    id = 'foaf_usable'
+  
+    def call(self):
+        self.cell_call(0, 0)
+            
 class EditGroups(EntityForm):
     """displays a simple euser / egroups editable table"""