[web2py] Re: py4web: how to import Template and change delimiters
it's port lte-2.4.15 to py4web https://github.com/ali96343/lteadmin-py4web четверг, 1 августа 2019 г., 10:48:02 UTC+3 пользователь Alex Beskopilny написал: > > Hi! > I put lte-2.4.15 to py4web and lte works with controllers.py : > > from py4web import action, request, abort, redirect, URL > from yatl.helpers import A > from . common import db, session, T, cache, auth > > @action('index') > @action.uses('index.html', ) > #@action.uses(Template('index.html', delimiters='[[ ]]')) > def index(): > message= "index.html" > user= "first second third" > return dict(message=message, user=user) > .. > but does not works with : > from py4web import action, request, abort, redirect, URL , Template > > > > error message: > WARNING:tornado.access:404 GET /lte2 (127.0.0.1) 1.20ms > WARNING:tornado.access:404 GET /lte2 (127.0.0.1) 1.55ms > WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 1.45ms > > how to fix it ? > > Is it possible to use some characters for delimiters, > for example delimiters='XXX ' ? > what is limits for delimiters ? > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/340caf35-ba63-4255-a925-3be063ee7982%40googlegroups.com.
[web2py] Re: py4web: how to import Template and change delimiters
Thanks Massimo! it works: deliniters="X0X0X0 Y1Y1Y1" and delimiters="[Z[ ]]" py4web was tested with urls lte-2.14.15 and ThreadPoolExecutor(max_workers=10) results: execution time: 98.3 sec, data_size= 3794965000, urls= 56000 bytes/sec= 38596744.13, req/sec= 569.54 четверг, 1 августа 2019 г., 10:48:02 UTC+3 пользователь Alex Beskopilny написал: > > Hi! > I put lte-2.4.15 to py4web and lte works with controllers.py : > > from py4web import action, request, abort, redirect, URL > from yatl.helpers import A > from . common import db, session, T, cache, auth > > @action('index') > @action.uses('index.html', ) > #@action.uses(Template('index.html', delimiters='[[ ]]')) > def index(): > message= "index.html" > user= "first second third" > return dict(message=message, user=user) > .. > but does not works with : > from py4web import action, request, abort, redirect, URL , Template > > > > error message: > WARNING:tornado.access:404 GET /lte2 (127.0.0.1) 1.20ms > WARNING:tornado.access:404 GET /lte2 (127.0.0.1) 1.55ms > WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 1.45ms > > how to fix it ? > > Is it possible to use some characters for delimiters, > for example delimiters='XXX ' ? > what is limits for delimiters ? > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/caaf1e92-773b-496c-9bf9-d87884d53ece%40googlegroups.com.
[web2py] Re: py4web: how to import Template and change delimiters
Try from py4web.core import Template On Thursday, 1 August 2019 00:48:02 UTC-7, Alex Beskopilny wrote: > > Hi! > I put lte-2.4.15 to py4web and lte works with controllers.py : > > from py4web import action, request, abort, redirect, URL > from yatl.helpers import A > from . common import db, session, T, cache, auth > > @action('index') > @action.uses('index.html', ) > #@action.uses(Template('index.html', delimiters='[[ ]]')) > def index(): > message= "index.html" > user= "first second third" > return dict(message=message, user=user) > .. > but does not works with : > from py4web import action, request, abort, redirect, URL , Template > > > > error message: > WARNING:tornado.access:404 GET /lte2 (127.0.0.1) 1.20ms > WARNING:tornado.access:404 GET /lte2 (127.0.0.1) 1.55ms > WARNING:tornado.access:404 GET /favicon.ico (127.0.0.1) 1.45ms > > how to fix it ? > > Is it possible to use some characters for delimiters, > for example delimiters='XXX ' ? > what is limits for delimiters ? > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/a536b649-a4c8-42a3-a0c4-7741a6f8bdb2%40googlegroups.com.