Leonel, 

Adding this to the layout.html and index.html I get the following error:

missing "pass" in view
Versionweb2py™Version 2.9.11-stable+timestamp.2014.09.15.23.35.11PythonPython 
2.7.8: c:\python27\python.exe (prefix: c:\python27)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.

Traceback (most recent call last):
  File "c:\web2py\gluon\rocket.py", line 1337, in run
    self.run_app(conn)
  File "c:\web2py\gluon\rocket.py", line 1830, in run_app
    self.environ = environ = self.build_environ(sock_file, conn)
  File "c:\web2py\gluon\rocket.py", line 1650, in build_environ
    request = self.read_request_line(sock_file)
  File "c:\web2py\gluon\rocket.py", line 1401, in read_request_line
    raise SocketTimeout('Socket timed out before request.')
SocketTimeout: Socket timed out before request.

Also some variants give this error.

On Wednesday, October 29, 2014 4:29:40 PM UTC+1, Leonel Câmara wrote:
>
> That should work perfectly fine. This is how I do it, if you would like 
> another example.
>
> I have this in my layout.html before  {{include 'web2py_ajax.html'}}
>
> }}
>   ractive_enabled = globals().get('ractive_enabled',False)
>   if ractive_enabled:
>     response.files.append(URL('static','js/ractive.js'))
>     response.files.append(URL('static','js/ractive-events-tap.js'))
>     response.files.append(URL('static','js/ractive-transitions-fade.js')) 
>    
>   pass
> }}
>
> Then on my views using ractive, I have ractive_enabled=True and I change 
> ractive delimiters. Example:
>
> <script>
> var ractive = new Ractive({
>     el: '#main',
>     template: '#main-template',
>     delimiters: [ '[[', ']]' ],
>     tripleDelimiters: [ '[[[', ']]]' ] ,
> });
> </script>
>
> I prefer changing ractive's delimiters, Massimo, for instance, prefers 
> your approach.
>
>

-- 
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