I'm using the ajax strategy suggested by mdipierro here
https://groups.google.com/d/msg/web2py/5rIQhH-RD28/Rp54nhJ1j28J
My code looks like this:
In default.py:
def update_stackItems():
stackID = request.args[0]
stack = session.stack_dict[int(stackID[5:])]
return
response.render(URL(
I see. Thank you for your help!
David
On 22.7.2015 19:16, Anthony wrote:
It has nothing to do with WSGI. Now that I look back at the code, I
see that run_view_in() simply looks for a "compiled" folder, and if
it exists, it assumes all views are compiled. That means if any part
of the app is com
It has nothing to do with WSGI. Now that I look back at the code, I see that
run_view_in() simply looks for a "compiled" folder, and if it exists, it
assumes all views are compiled. That means if any part of the app is compiled,
even a single non-compiled view will lead to this error (which is w
Thank you, Anthony!
I deploy the app using commandline script which packs the application
sources, uploads them on server and calls a server-side script which
compiles the app.
So, on the server side in the application folder I have standard
directory structure - source files in 'models', 'c
Probably you chose "Pack compiled" in admin, which packs only the compiled
models, controllers, and views. If you didn't compile the views, then your
packed app will have no views. Instead, choose "Pack custom", and be sure to
include the /views folder.
A while back, I submitted a patch that wo
Hi, Anthony,
thank you for explaining the meaning of the 'context' argument. It works
now as expected.
The suggested approach with variable in extend is neater. It works well
in my development environment. But in the production environment I use
web2py behind Apache through WSGI. If I compil
Your context is an empty dict, so the template doesn't see any of the usual
globals.
Anyway, this approach is unnecessary. The argument to extend can be a Python
expression, do just use the extendtempl variable in the extend statement in the
view. The only drawback is that you won't be able to
Hi :)
I would like to run one app on more domains and allow users to apply
per-domain specific skins. E.g. default/index.html should be extending
layout_xyz.html for domain xyz.com, but layout_abc.html for domain abc.com.
As covered in the documentation, conditional {{extend}} does not work.
Is it possible to call response.render(view, vars) in a controller,
but have the view not a file, but as a string ?
The reason I want to do this is that I am getting the view from a
database table and replacing bits of it with python code snippets
{{some code}} which response.render will evaluate.
How does one retrieve a html view without including the layout?
e.g. In my controller:
outstr = response.render('item.html',dict(myvar=myvar))
My view item.html is:
This is my variable: {{=myvar}}
Note the view does not {{extend layout.html}}.
However 'outstr' still ends up containing the
10 matches
Mail list logo