work in progress: document generation
This commit is contained in:
		
							parent
							
								
									f9e89cff93
								
							
						
					
					
						commit
						46e8939ee1
					
				
					 2 changed files with 7 additions and 3 deletions
				
			
		|  | @ -29,8 +29,12 @@ word_template = ViewPageTemplateFile('word_page.pt') | ||||||
| 
 | 
 | ||||||
| class Base(BrowserPage): | class Base(BrowserPage): | ||||||
| 
 | 
 | ||||||
|     def __call__(self): |     encoding = 'UTF-8' | ||||||
|         return self.index() | 
 | ||||||
|  |     def __call__(self, *args, **kw): | ||||||
|  |         data = self.index(*args, **kw).encode(self.encoding) | ||||||
|  |         self.setHeader(data) | ||||||
|  |         return data | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class WordDocument(Base): | class WordDocument(Base): | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ | ||||||
|   </head> |   </head> | ||||||
| 
 | 
 | ||||||
|   <body class="doc"> |   <body class="doc"> | ||||||
|     <div xxtal:replace="structure view/text">Body Text</div> |     <metal:content use-macro="view/content" /> | ||||||
|   </body> |   </body> | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue