Thanks, that does it :) I'll probably automate the conversion since I'm 
using Jade to generate the html

On Monday, 21 April 2014 16:43:03 UTC+1, Anthony wrote:
>
> Would it be difficult to simply define the functions in a module, or do 
> they include a lot of interspersed HTML? If the latter, you can still port 
> the functions to standard Python functions in a module by wrapping any HTML 
> lines in response.write(). You can also automate the conversion of existing 
> functions as follows:
>
> from gluon.template import TemplateParser
> converted_code = TemplateParser(original_code).to_string()
>
> Otherwise, you can store the shared files in a central location and 
> reference them via "../../path/to/shared/views".
>
> Anthony
>
> On Monday, April 21, 2014 5:57:33 AM UTC-4, Thomas de Noronha e Silva 
> wrote:
>
>> I have a file A.html containing a couple of view functions that I want to 
>> include in several view across different apps. Is there a way in web2py 
>> that avoids either replicating the files or using volatile file paths? 
>> Ideally, I wish I could import the compiled version of view functions in a 
>> similar way I'd do it with a module?
>>
>> I might be missing something very obvious too, I'm prepared for that 
>> possibility :)
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to