Hi!
I would need to set up my web2py application to login through a service
based on this library: https://github.com/auth0/java-jwt
Is there some login method in contrib that already perfectly fit to it
or do I have to implement the interface following the existent examples?
Any idea?
Hi!
What's the correct way to add custom headers to response with status
different to 200 (i.e. 500)?
Thanks a lot
Manuele
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Actually I used request.env.HTTP_X_FORWARDED_SERVER I really don't know
if your answer fits anyway.
Thanks!
Manuele
On 09/09/20 16:44, Clemens wrote:
Does request.env.http_host gives us the information you want?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
Hi!!
Behind a mod_proxy apache virtual host how can I get within the server
side code witch hostname has been currently called? Considering at the
moment I have configured one hostname and more than one aliases I'd like
not to write the hostname directly ion the code.
Thanks a lot!
success till now.
I'll be glad for any siggestion
Cheers
Manuele
Forwarded Message
Subject:client side caching
Date: Wed, 13 May 2020 09:45:58 +0200
From: Manuele Pesenti
To: py4web
Hi!
I wrote this little function trying to re-implementing client side
Hi!
In order to work with spatialite I had to patch the Spatialite class in
this way in my model file (actually in py4web but the pydal is a common
project dependency):
from unittest import mock
...
# Before declaring first DAL instance
patcher =
Hi *!
Would it be possible to setup an application in order that the
verification is always required for registration and the approval would
be required only if an extra auth_user field is leaved blank during
registration?
Thanks a lot
Manuele
--
Resources:
- http://web2py.com
-
Hi!
I realized with the help of Mapnik a quite raw but interesting tile
server on top of web2py with the aim of serve some tile layers from some
Postgis ad-hoc views. The main problem is that when too many requests
are performed typically by quick zoom on a map some requests remains
without
github.com/web2py/web2py/blob/R-2.18.3/scripts/web2py.ubuntu.sh
Best regards
Manuele
On 21/01/20 16:29, Manuele Pesenti wrote:
On 21/01/20 15:10, Manuele Pesenti wrote:
So I guess I have to try using the second web2py (R-2.18 under
python3 virtualenv) instance through mod_proxy... right
On 21/01/20 15:10, Manuele Pesenti wrote:
So I guess I have to try using the second web2py (R-2.18 under python3
virtualenv) instance through mod_proxy... right?
So I'm trying to run a web2py (R-2.18.3) instance for deploy purposes
using apache mod_proxy.
First I want to install
On 21/01/20 14:59, Manuele Pesenti wrote:
Thank you Tim,
I tried but restarting apache and accessing the instance the browser
takes a long time to respond and I get this error in log:
ImportError: No module named site
Could it be related to this https://stackoverflow.com/a/41006418
Thank you Tim,
I tried but restarting apache and accessing the instance the browser
takes a long time to respond and I get this error in log:
ImportError: No module named site
This is how my apache configuration looks like if could be of any help
to understand the problem:
ServerAdmin
Hi!
If I need to manage on the same server two different web2py instances
(for example for having two distinct versions of web2py running) what
are the differences I have to consider with what reported in
documentation[1]?
At the moment I already have the first instance running through wsgi
Yes! It seams the right way... thank you Dave
M.
On 21/01/20 09:45, Dave S wrote:
Check out routes.py, as described at
http://www.web2py.com/books/default/chapter/29/04/the-core#URL-rewrite>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Hi!
For our deploy installation I followed successfully the procedures in
documentation so now I have my server exposing the web2py root, now I
tried to configure a second host name using an apache reverse proxy
configuration to serve directly a specific application, is it possible?
Let's
I'm loving it!
Thanks again Massimo
Manuele
On 24/07/19 07:40, Massimo Di Pierro wrote:
OK. I know. I am not good with names.
But there are lots of requirements to be fulfilled.
py4web.com was available and the pypi package was available.
Here is running on google cloud:
Il 15/07/19 14:45, Manuele Pesenti ha scritto:
> "(housenumbers.city ILIKE '%sant\_olcese%' ESCAPE '\'))" with
I beg your pardon because of the string was passed through GET method it
was encoded and checked so the single quote was substituted by a
underscore. I solved usin
Hi! I have some trouble looking for records in PostgreSQL DB filtering
using "contains" DAL method with substring containing single quote...
I found the raw solution sobstituting the resulting query filter
"(housenumbers.city ILIKE '%sant\_olcese%' ESCAPE '\'))" with
"(housenumbers.city ILIKE
Hi everybody!
I'd like just to share a thought I had browsing around last week... I
found this web site https://spark.laravel.com and I realize how great
would be to have modular plugins to build hi level scaffolding
applications... don't you agree? :)
M.
--
Resources:
-
with the same problem
Cheers
Manuele
On 05/12/2018 12:13, Manuele Pesenti wrote:
Hi!
we are trying to build up printable report from a view. We'd like to
use xhtml2pdf instead using the web2py embedded library fpdf.
How the view template file should look like?
Essentially we tried something like
Hi!
we are trying to build up printable report from a view. We'd like to use
xhtml2pdf instead using the web2py embedded library fpdf.
How the view template file should look like?
Essentially we tried something like the following without success:
{{
from xhtml2pdf import pisa
from StringIO
Hi Anthony,
thanks for your replay.
On 17/11/2018 16:01, Anthony wrote:
What do you mean by "returns None"? I do not think the function env()
can return None, so where are you seeing None?
I see the string None in the browser when I try to access the
controller. I guess the code exits in
Hi!
Is there any good reason why thees few code lines that perfectly run on
a python interpreter returns None if called in a controller?
from gluon.shell import env
def index():
other_env = env("my_other_application", True)
return dict()
I would like to access a complete model
Hi!
Is there a way to let a web2py application support both openid and
standard authentication in parallel?
Applying what mentioned in the documentation[*] the standard login form
is substituted with the openid form and there's no way to login the
application using username and password. An
or just let you be inspired from the update_or_insert method itself:
https://github.com/web2py/pydal/blob/70929a6dc03e6296c34944d2d232f257b78337d7/pydal/objects.py#L822
something like the following lines maybe will fit your needs:
def update_or_insert(self, _key=DEFAULT, **values):
if
On 09/07/2018 09:56, Martin Weissenboeck wrote:
What I want to do:
I have a running scheduler action and I want to interrupt this action
and postpone it for a later time. What would be the best solution?
consider to:
1. Setup the task in order to be re-tried till it will end up with
Hi Dave,
thanks for your reply, I'm actually debugging but I found that the
problem was a callback I added after scheduler_run update event in order
to be advised by email for failed tasks.
Is there a more correct way of doing it? Maybe should be a good feature
for schduler.
Cheers
Hi!
I'm in a trouble with the web2py (2.14.6 on python 2.7) scheduler that
seams stop to run correctly... the tasks get the RUNNING status but
nothing is performed and the task stay in the running status forever. I
cannot understand how can it be possible.
Any idea?
Thanks a lot
Il 13/05/18 16:31, Andrea Fae' ha scritto:
> When I try to "push git " i See the error "requires gitpython module"
Have you tried
https://gitpython.readthedocs.io/en/stable/intro.html#installing-gitpython ?
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> -
Il 29/03/18 21:13, Richard Vézina ha scritto:
> They are intent to be used to specify something before or after the
> delete... I mean even if there is no "pure" deletion occuring your
> record doesn't exist anymore for the end user once you "deleted" it
> even if versioning mechanism keep trace
Are actually _before_delete and _after_delete callbacks called on record
delete event even if on versioned tables?
I mean on versioned tables records are just updated from is_active True
to False and not really deleted... right? So what is in thees cases the
called list of callback
Il 25/03/18 00:51, Patrick Rodrigues ha scritto:
> I was developing the same feature for my website today, and this help
> me a lot.
> In my case I was using Dango Rest Framework, and I was using
> request.data and parsing it to JSON, insted of using request.body.
> But now it works, thank you
Il 16/03/18 15:59, Anthony ha scritto:
> I'm not sure if it includes the entire original HTTP message or just
> the request body, but you can try request.env['wsgi.input']. If that
> doesn't work, web2py (and probably any WSGI-compliant framework) would
> not have access to the original HTTP
On 15/03/2018 22:17, Manuele Pesenti wrote:
You might be better off getting help from folks who know
WooCommerce, as this issue does not appear to be web2py specific.
Yes for sure! Thanks a lot.
M.
Before to definitely fly to other places where to find answers to my
problem I have one
Il 15/03/18 20:21, Anthony ha scritto:
> Hard to say what's wrong. Where did you get that signature and request
> body? You might be better off getting help from folks who know
> WooCommerce, as this issue does not appear to be web2py specific.
>
Yes for sure! Thanks a lot.
M.
--
Resources:
On 01/03/2018 00:50, Anthony wrote:
I think you're on the right track. If you need the original request
body to verify the signature, request.body.read() should do it. Does
that not work?
Hi Anthony,
actually no :( it doesn't work, here[1] I tried to extrapolate the very
essential code in
Hi!
What's the difference between thees two (different?) approaches:
* https://support.google.com/analytics/answer/1008080?hl=en
*
http://web2py.com/books/default/chapter/29/05/the-views?search=analytics#Default-page-layout
the script integrated in the web2py framework it's not so easy to
On 12/03/2018 15:08, Anthony wrote:
What if I cache on disk the result of a function that returns the
session id and I check if it corresponds to the real value?
Not sure what you mean. Where does the session ID produced by the
function come from, and how is the "real value"
Il 07/03/18 15:51, Anthony ha scritto:
> Be aware, that will require a database select on every request. If you
> want to minimize the database hits, you could also store in the
> session the time of the last database lookup, and then only check the
> database every X minutes (the tradeoff being
Thanks a lot Massimo! As precious as ever.
:)
M.
On 07/03/2018 07:02, Massimo Di Pierro wrote:
it is possible.
when a user first logs in, store a uuid in the session and write it in
the database (in a new custom field in the auth_user table). When a
request arrives if the uuid in the
Hi!
Is there a way not to let users to be connected to the application with
diffrerent session at the same time?
We are thinking of way how to prevent and limit the account sharing so
even suggestion on how to take care of devices used for connections
would be appreciated.
Best regards
On 01/03/2018 03:25, Dave S wrote:
Don't you want a dummy parameter on verify_signature(), to prevent it
being a URL-visible function?
well actually it can even stay inside the models not a controller... in
that case if it's not decorate as a service it cannot be visible. right?
Il 28/02/18 17:10, Anthony ha scritto:
> You could parse the request body yourself, but web2py will do it
> automatically and put the variables in request.post_vars (if JSON is
> posted, its keys will become the keys of request.post_vars).
>
> I'm not sure what you mean by "check the
Thank Antony,
On 28/02/2018 15:50, Anthony wrote:
The webhook request headers will be in
request.env.http_x_wc_webhook_[specific header] (e.g.,
request.env.http_x_wc_webhook_signature).
ok got it!
It looks like WooCommerce makes a POST request, so the values posted
should end up in
Hi!
I need to develop a web service that listen to webhook calls from a
woocommerce site, I thought to write a little check class to pass to
auth.requires decorator like the following:
class HookCheck(object):
secret = ''
def __init__(self):
super(HookCheck,
Hi Anthony and LoveWeb2py,
I used this controller exactly to let authenticated and authorized users
access to a third part application not exposed to the web, I shared in
order to collect opinions from experts, any suggest appreciated.
Cheers
Manuele
On 14/02/2018 13:37, Anthony
I wrote something like that few years ago... maybe you can start from here:
https://gist.github.com/manuelep/81ffe8ce57de4dc9b2d80a99c08992cc
please let me know if you find any interest in it.
Cheers
Manuele
On 13/02/2018 13:10, Anthony wrote:
On Monday, February 12, 2018 at 9:43:53 PM
Dear all,
is it indeed sill a good and updated choice to setup the variable
response.google_analytics_id (in menu.py) in order to activate GA[1]?
I mean reading the offical GA documentation[2] it seams that GA is
activated with such different js code and I was thinking if would be a
better
Hi Anthony,
thank you for your reply,
On 06/12/2017 15:36, Anthony wrote:
I followed what indicated in the web configuration panel setting
up two
static configuration considering that my application is accessible
both
as init and as .
First, what do you mean by this --
Hi!
I'm trying to setup static files mapping for my application loaded on
pythonanywhere service.
I followed what indicated in the web configuration panel setting up two
static configuration considering that my application is accessible both
as init and as .
In order to be sure the
Ok that's the problem, I'm using a 2.14.6 release.
Thanks Anthony and others
On 28/10/2017 13:14, Anthony wrote:
That was a bug but should be fixed in web2py 2.15.
If you can't upgrade, as an alternative, see:
https://groups.google.com/d/msg/web2py/JeE6jLP-qjI/MXS0MVdOCQAJ
Anthony
--
It seams that the parameter request.is_scheduler is always set to false
on my colleague windows system
could it be a possible bug? Any other experience?
M.
On 20/10/2017 17:20, Anthony wrote:
If it is a scheduler execution, request.is_scheduler will be True.
Anthony
--
Resources:
-
Il 25/10/17 08:56, Dave S ha scritto:
> Line 166 is the error handler after a try: run_models_in() . Anything
> unusual about the models for this app?
> Do you see an exception printed (on the console -- sys.stderr is used)
> with the stack trace?
>
> /dps
Thank you Dave for your answare. I'm
Il 24/10/17 13:47, Giles Thomas ha scritto:
> Hi Manuele,
>
> PythonAnywhere dev here: there's no extra cost if you want to increase
> the maximum number of Postgres connections -- just follow the
> instructions on this help
> page: https://help.pythonanywhere.com/pages/PostgresConnections/.
>
Hi *!
What could be the reason of the subsequant traceback during a scheduler
function execution?
"Traceback (most recent call last): File
"/home/colouree/web2py/gluon/scheduler.py", line 293, in executor
_env = env(a=a, c=c, import_models=True) File
"/home/colouree/web2py/gluon/shell.py",
Thanks Alex,
that's what I get from the db engine about my maximum number of connections:
psql (9.4.11, server 9.4beta3)
Type "help" for help.
postgres=# SHOW max_connections;
max_connections
-
20
(1 row)
reading the suggested wiki page I found this: "PostgreSQL on good
I often get this error from the db engine of my pythonanywhere account
service
OperationalError: FATAL: remaining connection slots are reserved for
non-replication superuser connections
is there something quick to solve or by-pass it or do I need some
profiling to limitate requests to the
Hi *!
Is there a way to distinguish from within a function if it's run from
the scheduler or not?
thanks a lot
M.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
Il 04/08/17 16:08, Manuele ha scritto:
> Dear all,
>
> I'm bound to decide which service to use for the deploy of a brand new
> web application, at the moment I'm trying Openshift but I'm open to
> alternatives, the first mandatory requirement is that the service must
> support the web2py
Hi,
from some time (days but maybe weeks) the web2py web site seams not
reacheable for me... anybody has the same trouble?
Cheers
Manuele
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Il 08/04/17 09:43, Manuele Pesenti ha scritto:
> What if I want a customization for a specific grid and not for all the
> application?
I solved changing the value of the js variable in the header of the page
where the message has to be different from the others defining again the
va
Il 07/04/17 14:37, Leonel Câmara ha scritto:
> You can change it in the web2py_ajax.html view it's the
> w2p_ajax_confirm_message var.
Thanks Leonel,
What if I want a customization for a specific grid and not for all the
application?
Is there other way?
Thank a lot
Cheers
Manuele
--
Hi!
Is there an easy way to customize the warning message that pops up when
I try to delete a record from a table using gird?
Both from grid and from edit interface, hopefully from the same place ;)
Thanks a lot
M.
--
Resources:
- http://web2py.com
- http://web2py.com/book
Il 06/03/17 17:27, Richard Vézina ha scritto:
> See at the end of LOAD section in the book
> :
> http://web2py.com/books/default/chapter/29/12/components-and-plugins?search=web2py_component#LOAD
Wow! Thanks... I'll give it a try.
M.
--
Resources:
- http://web2py.com
-
Hi!
Would it be possible to initialize a new component via javascript?
I would like to dinamically define a component inside a bootstrap modal
object and than initialize it.
I've tryied with reload command but it does not work... it gave me this
error:
TypeError: jQuery(...).get(...).reload is
Il 27/12/16 17:22, Anthony ha scritto:
> I'm not sure it's considered part of the public API (it's not in the
> book), but you can do:
>
> |
> filepath
> =db.mytable.myupload.retrieve_file_properties(row.myupload)['path']
> |
>
> The returned dictionary also includes a "filename" key, which holds
Hi!
Other than the methods "store" and "retrieve" of a field is there a
programmatic way to get from a row just the path where a file is stored
on the filesystem (expecially when uploadseparate option is set to True)?
Thank you very much
Manuele
--
Resources:
- http://web2py.com
-
Il 28/11/16 13:07, Anthony ha scritto:
> .w2p files (including plugin files) are just .tar.gz files, so
> ultimately you just need to unzip it over the application folder. To
> do that, you can use the gluon.fileutils.w2p_unpack_plugin function
> (or just the gluon.fileutils.w2p_unpack function,
Hi!
I'm trying to figure out how to install a web2py plugin without using
the admin web interface but a batch procedure running a script or
command... any idea?
Thank you very mutch
Cheers
Manuele
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Il 08/11/16 02:55, Massimo Di Pierro ha scritto:
> Please open a pydal issue.
Ok done https://github.com/web2py/pydal/issues/428
Thank Massimo :)
M.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Il 07/11/16 18:11, Alex Glaros ha scritto:
> Thanks guys. Will probably use GIS later but for now, can you help me
> with the field definition syntax for float? Is this correct?
>
> Field('longtitude', 'FLOAT((5,2))'),
> Field('latitude', 'FLOAT((5,2))'),
uhm it seams you want decimal ;)
Il 07/11/16 05:35, Alex Glaros ha scritto:
> Which web2py data type for latitude and longitude?
>
> Am using Postgres database
>
> thanks,
>
> Alex Glaros
It depends... for enjoing the full power of GIS capabilities you can
consider of using a geometry() field[1] but in this case a PostGIS
Hi!
Something odd seams happen passing from pydal 16.03 to a newer version
using json field and postgresql adapter.
This is the traceback I get from the newer version when exploring table
data through admin:
Traceback (most recent call last):
File
Il 02/11/16 09:27, icodk ha scritto:
> Ex. on Manday I want to select all record where the Monday field is true.
maybe something like that?
|fromdatetime importdate importcalendar my_date =date.today()dow =
calendar.day_name[my_date.weekday()].lower()
db(db.time_rule[dow]==True).select() |
||
Il 30/09/16 19:47, António Ramos ha scritto:
> Hello, i would like to suggest the ability to duplicate a record in
> admin.
>
> It would make me happy :)
what about doing it in your web2py console with something like:
db.table[0] = {k: v for k,v in db.table[id].iteritems() if k!='id'}
M.
>
Il 08/09/16 10:57, Gael Princivalle ha scritto:
> Hello.
>
> Could someone give me an example of the postgis st_within function?
>
> http://postgis.org/docs/ST_DWithin.html
>
> Model
> |
> db.define_table('places',Field('loc','geometry()'))
> |
> Where I insert 3 geoPoints:
> |
>
Il 30/08/16 21:40, Niphlod ha scritto:
> +1 for Dave .
>
> with isempty() in a model you're executing a query for each and every
> request for absolutely NO REASON.
I usually create a script directory and put there scripts with commands
to be performed only once, such in the case of
Il 08/07/16 08:54, Kenneth ha scritto:
> Hello,
>
> I fetch a number on records from the database and show it on the
> screen. Is there a way to not print the text None for fields that are
> in the state None. I could use if field != None but I'd rather not use
> IF if there is an other way.
I
Il 14/06/16 20:50, Vic Ding ha scritto:
> It works when I directly access the index page, however when I LOAD it
> to other pages it stops working. No ticket, no error.
> |
> {{=LOAD('plugin_upload_file','index',args=('item',item_id),user_signature=True)}}
> |
>
>
> Any idea?
maybe it could
Il 17/06/16 14:31, Steve Joe ha scritto:
> I know how redirect works. But I am not sure how to redirect to
> another app on the same web2py site.
> i dont want to put long url , something like this:
> redirect("http://127.0.0.1:8000/port/;)
> as it looks so naive
>
Il 17/06/16 11:06, Steve Joe ha scritto:
> def index():
> skills=db(db.skills.id>0).select()
> pro_lang=[]
> fake=[]
> for skill in skills:
> if skill.skilltype=="Programming Languages":
> pro_lang.append(skill)
> else:
> fake.append(skill)
>
Il 17/06/16 08:20, Steve Joe ha scritto:
> exact syntax?
Have you looked for it in the doc?
http://www.web2py.com/books/default/chapter/29/04/the-core?#HTTP-and-redirect
http://www.web2py.com/books/default/chapter/29/04/the-core#URL
Cheers
M.
--
Resources:
- http://web2py.com
-
Il 05/06/16 00:06, 黄祥 ha scritto:
> what i want to achieve is showing a map in each row of
> SQLFORM.smartgrid links (looks like in the attached file)
> thanks massimo, tried your suggestion, but got the same result. any
> idea or suggestion to achieve it in web2py?
>
Hi Stifan,
what about
Il 14/06/16 23:22, Manuele Pesenti ha scritto:
>
> Yes! It fixes the bug. I'll open the issue.
>
> Thanks to Everyone! :)
>
> M.
>
just opened: https://github.com/web2py/web2py/issues/1364
Best regards
M.
--
Resources:
- http://web2py.com
- http://web2py.com/book (
Il 14/06/16 21:19, Anthony ha scritto:
> es, looks like a bug here:
> https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/web2py-bootstrap3.js#L14.
> Should be:
>
> |
> $.web2py.validate_entropy($(this));
> |
>
> See if that change works, and please file a Github issue.
>
>
Il 14/06/16 17:56, Richard Vézina ha scritto:
> You miss web2py-bootstrap3.js in your app? Was that error with default
> welcome or your app?
First I got in my app (in wich I rewrote all the layout) but I noticed
that I get the same error using the appadmin... the error is raised in
Hi!
I found some client side trouble using the validator IS_STRONG.
Using this validator for such a field of a table and then visiting the
admin and trying to add a new record the debugger console shows thi error:
ReferenceError: web2py is not defined1 web2py-bootstrap3.js:14:6
At this link
Il 07/06/16 22:25, Niphlod ha scritto:
> for future lurkers of threads, posting the code, or even better a
> minimal app, it's not something Anthony (or the occasional helper)
> asks for his own amusement...that simple requirement forces your brain
> to reevaluate all the steps, in a clean
ng works as expected... At this point I have to
check what I missed in the original code...
Thanks a lot
M.
Il 07/06/16 21:31, Manuele Pesenti ha scritto:
> Il 07/06/16 15:24, Anthony ha scritto:
>> Again, it might help to see more code. For example, are you calling
>> sessi
Il 07/06/16 15:24, Anthony ha scritto:
> Again, it might help to see more code. For example, are you calling
> session.forget() at any point? What does the session look like at each
> stage (i.e., as each form is created and as each is submitted)? It
> sounds like the formkey for each form is not
Il 07/06/16 13:07, Anthony ha scritto:
> We may need to see more code. Do all the forms load on the page? If
> so, what happens in the browser network tab when you submit one of
> them? If the Ajax calls are being made properly, what happens on the
> server in the controller (i.e., where in the
Il 07/06/16 09:28, Steve Joe ha scritto:
> any stepwise procedure?
Just look here:
http://stackoverflow.com/questions/19215201/how-do-you-get-an-existing-web2py-app-deployed-on-openshift
I've done it only once and I can't remember now how :)
but I remember it was very easy.
M.
--
e at the first submit.
I hope I've given enough information to understand.
Thank you very mutch.
Cheers
Manuele Pesenti
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues
Il 16/05/16 15:43, Vic Ding ha scritto:
> |
> defremoveProduct():pid =request.args(0,cast=long)form
> =crud.delete(db.product,pid)response.js
> ='document.getElementById("product%s" %request.args(0,
> cast=int)).remove();'
> |
the first problem I see is that the last line has to be
ot. I even tried to hard code the div id in the response.js,
> did not do the trick either.
>
> Any other idea?
>
> Cheers,
> Vic
>
> On Monday, May 16, 2016 at 11:54:33 AM UTC+2, Manuele wrote:
>
> Il 16/05/16 11:52, Manuele Pesenti ha scritto:
>> response.
Il 16/05/16 11:52, Manuele Pesenti ha scritto:
> response.js = " document.getElementById("product%s" % request.args(0,
> cast=int)).remove();"
uhm try this one instead:
response.js = 'document.getElementById("product%s" % request.args(0,
cast=int)).remov
try to set in the removeProduct controller something like this (not tested):
response.js = " document.getElementById("product%s" % request.args(0,
cast=int)).remove();"
cheers
Manuele
Il 15/05/16 17:49, Vic Ding ha scritto:
> Hi all,
>
> I am new to web2py.
> I have a HTML helper
> |
>
Il 08/05/16 20:34, Simon Carr ha scritto:
> I found the problem, I had to add
>
> |
> user_signature=False
> |
>
> to the SQLFORM.grid i.e. (SQLFORM.grid(.,user_signature=False)
>
> This sorted out the problem
Now I think you can just decorate your controller function to prevent
not
Il 28/04/16 00:26, Val K ha scritto:
> Hi!
> I made mini but useful and universal class to hold json-serializable
> objects.
> Main goal - serialize objects having items-function() as js-objects
>
It looks very interesting to me :)
Thank you for sharing!
I'll notice here if I use it for a little
doh! http://www.web2pyslices.com/home
--
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
1 - 100 of 525 matches
Mail list logo