Re: [web2py] Re: string validation

2021-05-13 Thread Manuele
Thanks for the valuable advice about the regex! This is my solution: https://gist.github.com/manuelep/19a0e9ab6723086fdbf1ffa8e858a5f9 Cheers     Manuele Il 12/05/21 19:08, Raul Monares ha scritto: I found this code on the web # Python code to find the URL from an input string # Using

[web2py] string validation

2021-05-12 Thread Manuele
to limit it. Adding Google reCaptcha v2 to the registration forms didn't help. Thanks a lot     Manuele -- 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

[web2py] third party login using JWT

2020-11-18 Thread Manuele Pesenti
? Thanks a lot     Manuele -- 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 "w

[web2py] custom headers to error pages

2020-09-15 Thread Manuele Pesenti
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) - https://code.google.com/p/web2py/issues

Re: [web2py] Re: get the current hostname behind a mod_proxy installation

2020-09-10 Thread Manuele Pesenti
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

[web2py] get the current hostname behind a mod_proxy installation

2020-09-09 Thread Manuele Pesenti
!     Manuele -- 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&q

[web2py] Fwd: client side caching

2020-05-14 Thread Manuele Pesenti
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

[web2py] [OT] working with spatialite

2020-05-08 Thread Manuele Pesenti
solution to submit as an issue to the pydal project? Or does it depends on my local package configuration? Thanks a lot     Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py

[web2py] verification required and approval conditioned

2020-04-03 Thread Manuele Pesenti
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 - http

[web2py] too many requests raise a BrokenPipeError

2020-02-28 Thread Manuele Pesenti
a response and some messages from the rocket server pop up with thease messages: 2020-02-28 09:35:12,250 - Rocket.Errors.Thread-5 - ERROR - Traceback (most recent call last):   File "/home/manuele/development/PLANET/web2py_r-2.18/gluon/rocket.py", line 12

[web2py] web2py 2.18.3 Daemon problem with ubuntu 18.6 [was:] running two web2py instances on the same server under apache wsgi mod

2020-01-22 Thread Manuele Pesenti
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

Re: [web2py] Re: running two web2py instances on the same server under apache wsgi mod

2020-01-21 Thread Manuele Pesenti
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

Re: [web2py] Re: running two web2py instances on the same server under apache wsgi mod

2020-01-21 Thread Manuele Pesenti
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

Re: [web2py] Re: running two web2py instances on the same server under apache wsgi mod

2020-01-21 Thread Manuele Pesenti
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

[web2py] running two web2py instances on the same server under apache wsgi mod

2020-01-21 Thread Manuele Pesenti
st regards     Manuele [1] http://web2py.com/books/default/chapter/29/13/deployment-recipes -- 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 th

Re: [web2py] Re: web2py and reverse proxy. How to expose a single application behind a hostname

2020-01-21 Thread Manuele Pesenti
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) -

[web2py] web2py and reverse proxy. How to expose a single application behind a hostname

2020-01-20 Thread Manuele Pesenti
ome/static/css/bootstrap.min.css and so on. Is there a possible way to fix it with some framework configuration? Thank you very much. Best regards     Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code

Re: [web2py] web3py -> py4web

2019-07-31 Thread Manuele Pesenti
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: http://py4web.com

[web2py] Re: DAL contains query with single quote (with PG backend)

2019-07-15 Thread Manuele Pesenti
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

[web2py] DAL contains query with single quote (with PG backend)

2019-07-15 Thread Manuele Pesenti
t use the "E" at the beginning of the substring template. Thank you in advance for any suggestion. Cheers     Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repor

[web2py] just a thought

2018-12-17 Thread Manuele Pesenti
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: -

[web2py] Re: creating report using xhtml2pdf

2018-12-05 Thread Manuele Pesenti
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

[web2py] creating report using xhtml2pdf

2018-12-05 Thread Manuele Pesenti
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

Re: [web2py] Re: env

2018-11-19 Thread Manuele Pesenti
pecify env(..., import_models=True). That's what I've done ;) Thanks again Cheers     Manuele -- 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 messa

[web2py] env

2018-11-16 Thread Manuele Pesenti
lete model of another application, is it a deprecable behaviour? Thanks a lot     Manuele -- 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) --- Yo

[web2py] Re: Mixed login (openid and default auth)

2018-10-29 Thread Manuele
, Manuele ha scritto: > > 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

[web2py] Mixed login (openid and default auth)

2018-10-29 Thread Manuele Pesenti
. An I right? Or Did I misunderstand the doc? Thank you very mutch in advance Cheers     Manuele [*] http://web2py.com/books/default/chapter/29/09/access-control#OpenID -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

Re: [web2py] Re: update_or_insert doesn't always return the corresponding row id

2018-08-08 Thread Manuele Pesenti
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

Re: [web2py] Postpone a scheduler action

2018-07-11 Thread Manuele Pesenti
with success 2. Check if it's the case to postpone the task 3. if yes raise an exception an let fail the task eventually if the task is retried too early raise another exception in order to wait the two minutes. Could it fit your needs? Cheers     Manuele Why? The scheduler starts to send a message

Re: [web2py] Re: scheduler trouble

2018-07-06 Thread Manuele Pesenti
    Manuele On 06/07/2018 00:30, Dave S wrote: Never happens to me, so I can only guess:\ - you're waiting for a locked file ... IIRC, you're not using sqlite, though, right? I'm using PostgreSQL - you have a process that blocks waiting for results (like a response from a remote system

[web2py] scheduler trouble

2018-07-05 Thread Manuele Pesenti
    Manuele -- 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&q

Re: [web2py] web2py Requires gitpython module

2018-05-13 Thread Manuele Pesenti
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) > -

Re: [web2py] on delete event callbacks and versioned tables

2018-03-30 Thread Manuele Pesenti
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

[web2py] on delete event callbacks and versioned tables

2018-03-29 Thread Manuele Pesenti
? Thak you very mutch Cheers     Manuele -- 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

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-25 Thread Manuele Pesenti
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

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-17 Thread Manuele Pesenti
b.in or directly from the woocommerce event log web page) that I didn't notice they were converting string such as "" into the character €. That's why I didn't get the correct encoded string. Directly using what I get from request.body.read() everything worked fine. Best regards    

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-16 Thread Manuele Pesenti
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

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-15 Thread Manuele Pesenti
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:

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-15 Thread Manuele Pesenti
    raise AuthenticationError(result) AuthenticationError: WNeVWlUGBX6pSusRngDavUWlck6eAhVpTRoTYBbJdYM= -- Ran 1 test in 0.000s FAILED (errors=1) Any idea or suggestion will be appreciated! Cheers     Manuele [1] ht

[web2py] google analytics integration

2018-03-15 Thread Manuele Pesenti
to analyze because it's minimized and at the moment we use a framework version equal to 2.14.6 for the deployment, any suggest about it? Thanks a lot     Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https

Re: [web2py] Re: prevent multiple session at the same time

2018-03-15 Thread Manuele Pesenti
er hand I'm not sure that not to perform a database select query on every request but use the filesystem it's a better choice. Is it? Cheers     Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py

Re: [web2py] Re: prevent multiple session at the same time

2018-03-12 Thread Manuele Pesenti
the session id and I check if it corresponds to the real value? In this case how can I force to logout all other user logged in with the same username? I would prefer to give precedence to the last one who login. Cheers     Manuele -- Resources: - http://web2py.com - http://web2py.com/book (

Re: [web2py] Re: prevent multiple session at the same time

2018-03-07 Thread Manuele Pesenti
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

[web2py] prevent multiple session at the same time

2018-03-06 Thread Manuele Pesenti
    Manuele -- 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&q

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-03-01 Thread Manuele Pesenti
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?       

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Manuele Pesenti
  body = request.body.read() # ??     computed = compute(body)     if signature==computed:     return func(*args, **kw)     raise HTTP(403)     return wrapper @service.json def listenToHooks():     @hookCheck     def _main_():     # do stuff     return {}     retu

Re: [web2py] Re: How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Manuele Pesenti
, ok I agree and I don't think there is much gained by putting it inside ok... but why not? an @auth.requires decorator -- just run the relevant code directly in the listenToHooks function. Anthony Cheers     Manuele -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] How to verify woocommerce webhook signature in web2py auth decorator

2018-02-28 Thread Manuele Pesenti
re" and I'm not sure if the string from which get the hmac hash is just what I get from the read method of the request.body object. thank a lot     Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread Manuele Pesenti
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 wrote

Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-13 Thread Manuele Pesenti
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

[web2py] How to activate google analytics

2018-02-02 Thread Manuele Pesenti
choice follow the official reference of the service. Thanks for any suggest Cheers     Manuele [1] http://web2py.com/books/default/chapter/29/05/the-views?search=google_analytics_id [2] https://support.google.com/analytics/answer/1008080?hl=it -- Resources: - http://web2py.com - http

Re: [web2py] Re: serve static files in deployment on pythonanywhere

2017-12-06 Thread Manuele Pesenti
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 --

[web2py] serve static files in deployment on pythonanywhere

2017-12-06 Thread Manuele Pesenti
ees porpuses? Thanks a lot.     Manuele -- 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 Gr

Re: [web2py] Re: to be or not to be... run by scheduler

2017-10-30 Thread Manuele Pesenti
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 --

Re: [web2py] Re: to be or not to be... run by scheduler

2017-10-26 Thread Manuele Pesenti
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: -

Re: [web2py] Re: sistemExit during scheduler execution

2017-10-25 Thread Manuele Pesenti
your answare. I'm still looking for the cause of this problem but I think it could be related to the trouble I got with the database max number connections (look the thread "[...] too many db connections to db [...]" for details). Best regards     Manuele -- Resources: - http://web2py.

Re: [web2py] Re: maybe too many db connections todb on pythonanywhere

2017-10-24 Thread Manuele Pesenti
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/P

[web2py] sistemExit during scheduler execution

2017-10-24 Thread Manuele Pesenti
eb2py/gluon/shell.py", line 166, in env    sys.exit(1)SystemExit: 1" Cheers     Manuele -- 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 rec

Re: [web2py] Re: maybe too many db connections todb on pythonanywhere

2017-10-23 Thread Manuele Pesenti
tgreSQL on good hardware can support *a few hundred connections*. If you want to have thousands instead..." so it seams something can be done on the side of the db configuration... if permitted from the service (maybe paying something more). Cheers     Manuele On 21/10/2017 00:2

[web2py] maybe too many db connections todb on pythonanywhere

2017-10-20 Thread Manuele Pesenti
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

[web2py] to be or not to be... run by scheduler

2017-10-20 Thread Manuele Pesenti
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

[web2py] Re: OT: openshift trouble

2017-09-04 Thread Manuele
, Manuele ha scritto: Dear all, maybe someone had experience in deploying web2py on Openshift version 3. I'm trying to realize a kind of porting of openshift_web2py project for the new version (3) of the service but something goes wrong during deploy. I'd like to use the gunicorn HTTP

[web2py] OT: openshift trouble

2017-09-04 Thread Manuele
Dear all, maybe someone had experience in deploying web2py on Openshift version 3. I'm trying to realize a kind of porting of openshift_web2py project for the new version (3) of the service but something goes wrong during deploy. I'd like to use the gunicorn HTTP, but adopting a wsgy.py

Re: [web2py] Two database join query

2017-08-29 Thread Manuele
I think there's no way in a single query... try making two different query and join results creating a brand new rows object I hope it could help Manuele Il 28/08/2017 18:04, Artem ha scritto: Hello ! Hope someone can help . Thanks in advance ! I have two database : db1 = DAL('sqlite

[web2py] Re: easy deploy on OpenShift

2017-08-28 Thread Manuele
Il 22/08/2017 11:02, Manuele ha scritto: Dear web2py users, I'd like to submit to your attention this github project: https://github.com/manuelep/openshift_web2py it's a fork from the original homonym project no more mantained. Uhm... ok Openshift announced that it's going to dismiss

Re: [web2py] Re: easy deploy on OpenShift

2017-08-24 Thread Manuele
off course! I'll be happy to do it asap. Cheers Manuele Il 23/08/2017 17:59, Massimo Di Pierro ha scritto: Thanks Manuele, can I ask for a patch to the examples app that links to your page? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] easy deploy on OpenShift

2017-08-22 Thread Manuele
version to work with. Do you see any problem in it or have suggestions? Any contribution is welcome! :) Cheers Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: deploy with scheduler

2017-08-04 Thread Manuele Pesenti
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 >

[web2py] deploy with scheduler

2017-08-04 Thread Manuele
by openshift? Thank you very much Cheers Manuele -- 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

[web2py] web site down??

2017-06-07 Thread Manuele Pesenti
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) - https://code.google.com/p

Re: [web2py] Re: Customize grid ondelete warning message

2017-04-11 Thread Manuele Pesenti
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

Re: [web2py] Re: Customize grid ondelete warning message

2017-04-08 Thread Manuele Pesenti
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 M

[web2py] Customize grid ondelete warning message

2017-04-07 Thread Manuele Pesenti
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

Re: [web2py] initialize component via js

2017-03-06 Thread Manuele Pesenti
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 -

[web2py] initialize component via js

2017-03-06 Thread Manuele Pesenti
is not a function Any suggestion? Thanks Cheers Manuele -- 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

Re: [web2py] Re: get a file path instead retrieving it

2016-12-27 Thread Manuele Pesenti
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

[web2py] get a file path instead retrieving it

2016-12-27 Thread Manuele Pesenti
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

Re: [web2py] Re: install plugin via batch procedure

2016-11-28 Thread Manuele Pesenti
ack function, which is called by > the former). They are simple functions, so have a look at how they work. Thank you Anthony! I tried plugin_install from the python shell and it worked like a charm! Regards Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Docume

[web2py] install plugin via batch procedure

2016-11-28 Thread Manuele Pesenti
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) - http

Re: [web2py] Re: pydal bug or odd behaviour

2016-11-08 Thread Manuele Pesenti
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) -

Re: [web2py] Re: Which data type for latitude and longitude?

2016-11-07 Thread Manuele Pesenti
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 ;)

Re: [web2py] Which data type for latitude and longitude?

2016-11-07 Thread Manuele Pesenti
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

[web2py] pydal bug or odd behaviour

2016-11-07 Thread Manuele Pesenti
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 "/home/manuele/development/web/w

Re: [web2py] matching a Week day in query

2016-11-02 Thread Manuele Pesenti
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() | ||

Re: [web2py] A simple request for the "so old and so good admin"

2016-10-01 Thread Manuele Pesenti
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. >

Re: [web2py] st_within example

2016-09-08 Thread Manuele Pesenti
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: > | >

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-31 Thread Manuele Pesenti
y to suggest? Cheers Manuele -- 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 Gro

Re: [web2py] Do not show None

2016-07-08 Thread Manuele Pesenti
"None" for the records that has no value for the field in object, in that case you can fix the represent function of the field with something like field.represent = lambda v: "" if v is None else v; I hope it could help. Cheers Manuele > > > Kenneth > >

Re: [web2py] simple file uploader to database as a plugin

2016-06-17 Thread Manuele Pesenti
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

Re: [web2py] How do I redirect to a different application from one application?

2016-06-17 Thread Manuele Pesenti
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 >

Re: [web2py] How do I sort a list containing the rows of a db query according to a db table field?

2016-06-17 Thread Manuele Pesenti
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) >

Re: [web2py] How do I redirect to a different application from one application?

2016-06-17 Thread Manuele Pesenti
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 -

Re: [web2py] Re: show map on grid view

2016-06-17 Thread Manuele Pesenti
lidators#Virtual-fields-in-SQLFORMgrid-and-smartgrid 2) https://developers.google.com/maps/documentation/javascript/examples/marker-simple Cheers Manuele > thanks and best regards, > stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.co

Re: [web2py] Re: ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
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 (

Re: [web2py] Re: ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
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. > >

Re: [web2py] ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
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

[web2py] ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
you can find the page source I got: http://paste.debian.net/739046/ Maybe it's a bug? Thanks a lot Cheers Manuele -- 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

Re: [web2py] Re: multi component form loaded in the same page

2016-06-08 Thread Manuele Pesenti
nd I'm copy and paste from one app to another. This not helps. Cheers Manuele -- 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 thi

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Manuele Pesenti
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

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Manuele Pesenti
t. It seams to mean that only a formkey is saved in session and each form refers to the same formname to match the formkey passed in request. Is it a correct behaviour? Have I missed something in my code to get the expected result? Thank you very mutch Cheers Manuele -- Resources: - htt

  1   2   3   4   5   6   >