equal
deleted
inserted
replaced
10 |
10 |
11 from logilab.mtconverter import html_escape |
11 from logilab.mtconverter import html_escape |
12 |
12 |
13 from cubicweb.vregistry import objectify_selector |
13 from cubicweb.vregistry import objectify_selector |
14 from cubicweb.selectors import match_kwargs |
14 from cubicweb.selectors import match_kwargs |
15 from cubicweb.view import View, MainTemplate, NOINDEX, NOFOLLOW, STRICT_DOCTYPE |
15 from cubicweb.view import View, MainTemplate, NOINDEX, NOFOLLOW |
16 from cubicweb.utils import make_uid, UStringIO |
16 from cubicweb.utils import make_uid, UStringIO |
17 |
17 |
18 # main templates ############################################################## |
18 # main templates ############################################################## |
19 |
19 |
20 class LogInOutTemplate(MainTemplate): |
20 class LogInOutTemplate(MainTemplate): |
84 view.set_request_content_type() |
84 view.set_request_content_type() |
85 view.set_stream() |
85 view.set_stream() |
86 xhtml_wrap = (self.req.form.has_key('__notemplate') and view.templatable |
86 xhtml_wrap = (self.req.form.has_key('__notemplate') and view.templatable |
87 and view.content_type == self.req.html_content_type()) |
87 and view.content_type == self.req.html_content_type()) |
88 if xhtml_wrap: |
88 if xhtml_wrap: |
89 view.w(u'<?xml version="1.0"?>\n' + STRICT_DOCTYPE) |
89 view.w(u'<?xml version="1.0"?>\n' + self.doctype) |
90 view.w(u'<div xmlns="http://www.w3.org/1999/xhtml" xmlns:cubicweb="http://www.logilab.org/2008/cubicweb">') |
90 view.w(u'<div xmlns="http://www.w3.org/1999/xhtml" xmlns:cubicweb="http://www.logilab.org/2008/cubicweb">') |
91 # have to replace our unicode stream using view's binary stream |
91 # have to replace our unicode stream using view's binary stream |
92 view.render() |
92 view.render() |
93 if xhtml_wrap: |
93 if xhtml_wrap: |
94 view.w(u'</div>') |
94 view.w(u'</div>') |