[web2py] Re: Py4web: ¿Practical example step by step?

2020-01-21 Thread Massimo Di Pierro
I am preparing one. It will be done in 2 weeks. Promise. On Tuesday, 21 January 2020 01:15:27 UTC-8, Dave S wrote: > > > > On Monday, January 20, 2020 at 4:55:33 AM UTC-8, Yuver Parra wrote: >> >> >> Good morning and thanks in advance for sharing your knowledge in this >> group. >> Do any of you

Re: [web2py] py4web questions

2020-01-21 Thread Massimo Di Pierro
See my answer https://groups.google.com/d/msg/web2py/cgg6M7B_wkI/lWd-Ytt3DQAJ On Monday, 20 January 2020 22:55:28 UTC-8, Bruno Sarverry wrote: > > Hello John! did you solve it? I have the same problem. > > El jueves, 26 de septiembre de 2019, 6:05:52 (UTC-3), John Bannister > escribió: >> >> Hi

[web2py] Re: Looking for web2py developer for Italian small company

2020-01-21 Thread Massimo Di Pierro
I strongly recommend py4web + vue.js :-) On Tuesday, 21 January 2020 07:40:18 UTC-8, Ivan Gazzola wrote: > We are a small company in Italy, we need a new developer for our project ( > xortho.it) > > The web app is developed with jquery mobile and web2py, we are planning to > move to angular and

[web2py] Re: py4web - form field default - appears to not be working for me

2020-01-21 Thread Massimo Di Pierro
can you try this? form = Form() if not form.submitted: form.vars.update({field.name:field.default for field in form.table if field.default}) Maybe I can make this default behavior? On Tuesday, 21 January 2020 18:27:02 UTC-8, Jim S wrote: > > Sorry for all the py4web noob questions > > I hav

Re: [web2py] py4web - using session object in a template

2020-01-21 Thread Massimo Di Pierro
Lazy is good. You can turn it to your advantage with this: import functools def my_awesome_decorator(path=None, method=['GET','POST'], requires_login=False): def wrapper(func, path=path, method=method, requires_login=requires_login): path = path or func.__name__ template = func._

Re: [web2py] py4web - using session object in a template

2020-01-21 Thread Massimo Di Pierro
Lazy is good. You can turn it to your advantage with this: import functools def my_awesome_validator(path=None, method=['GET','POST'], requires_login=False): def wrapper(func, path=path, method=method): path = path or func.__name__ template = func.__name__+'.html' fixtures

[web2py] Re: Is there a working bootstrap3 formstyle for auth?

2020-01-21 Thread Alexander Hoch
Thx, that solved my problem after I reloaded my old web2py app. When generating SQLFORM an error "Formstyle not supported occurs". I added [forms] formstyle = bootstrap4_inline separator = to appconfig.ini and it works. -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

Re: [web2py] Looking for web2py developer for Italian small company

2020-01-21 Thread Hugo Alberto Rivera Diaz
I'm interested! 2 years of experience in jquery and web2py and still working with them! contact me! El mar., 21 ene. 2020 a las 9:40, Ivan Gazzola () escribió: > We are a small company in Italy, we need a new developer for our project ( > xortho.it) > > The web app is developed with jquery mobile

[web2py] py4web - form field default - appears to not be working for me

2020-01-21 Thread Jim S
Sorry for all the py4web noob questions I have the following: search_text = 'test' form = Form([Field('search', length=50, default=search_text)], form_name='search_form', formstyle=FormStyleBulma,

[web2py] Varying membership

2020-01-21 Thread Aydin
I have a bunch of accounts in web2py and I want to create for each a group that additional users could access those accounts. For example, account 1 has a group id 1 and now I want to add additional users to this group. The problem I have is how can I use this group id to authorize. Meaning that

[web2py] py4web - name of form - add classes to form

2020-01-21 Thread Jim S
I'm using Form from: from py4web.utils.form import Form I want to add some classes to the tag that is generated. In web2py I can add _class='field is-horizontal' when creating the instance and the classes will be passed along. Optionally I could add some css/javascript that could modify the

[web2py] Re: py4web - method not allowed

2020-01-21 Thread Jim S
Thank you again. Yes, that fixed it. -Jim On Tuesday, January 21, 2020 at 12:29:04 PM UTC-6, Val K wrote: > > It seems that your pydal is out of date, try to update it -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Re: py4web - method not allowed

2020-01-21 Thread Val K
It seems that your pydal is out of date, try to update it -- 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 subscr

Re: [web2py] Looking for web2py developer for Italian small company

2020-01-21 Thread Geordanis Baño Vega
Hi, i am interested. El mar., 21 ene. 2020 a las 10:40, Ivan Gazzola () escribió: > We are a small company in Italy, we need a new developer for our project ( > xortho.it) > > The web app is developed with jquery mobile and web2py, we are planning to > move to angular and web2py or better py4web.

[web2py] Re: py4web - method not allowed

2020-01-21 Thread Jim S
Thank you, that did the trick. Now however, I'm getting this traceback: ERROR:root:Traceback (most recent call last): File "/home/jim/.local/lib/python3.7/site-packages/py4web/core.py", line 543, in wrapper ret = func(*func_args, **func_kwargs) File "/home/jim/.local/lib/python3.7/site-pa

[web2py] py4web - method not allowed

2020-01-21 Thread Val K
Try method=... instead of methodS -- 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 Group

[web2py] Re: table.insert(**mydict) returns Field auth_user does not belong to the table

2020-01-21 Thread António Ramos
wrong Table!! Thank you!! Em ter., 21 de jan. de 2020 às 16:57, António Ramos escreveu: > Hello this is my model and code. Apparently all is ok but i get the error > *Field auth_user does not belong to the table* > *any help ???* > > > *Code and model* > mydict={"event":"testing testing",*au

[web2py] table.insert(**mydict) returns Field auth_user does not belong to the table

2020-01-21 Thread António Ramos
Hello this is my model and code. Apparently all is ok but i get the error *Field auth_user does not belong to the table* *any help ???* *Code and model* mydict={"event":"testing testing",*auth_user:4*} db.entities.insert(**mydict) db.define_table( 'events', Field('event', 'text'),

[web2py] Looking for web2py developer for Italian small company

2020-01-21 Thread Ivan Gazzola
We are a small company in Italy, we need a new developer for our project (xortho.it) The web app is developed with jquery mobile and web2py, we are planning to move to angular and web2py or better py4web. If you're interested please contact us. Ciao Ivan -- Resources: - http://web2py.com -

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

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

[web2py] py4web - method not allowed

2020-01-21 Thread Jim S
I'm getting the following when I click on the submit button on my form: Error: 405 Method Not Allowed Sorry, the requested URL 'http://127.0.0.1:8000/py4web_test/administration/links' caused an error: Method not allowed. My controller code: @action('administration/links', methods=['GET', 'POS

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

Re: [web2py] py4web - using session object in a template

2020-01-21 Thread Jim Steil
Thanks Massimo. I was hoping to avoid having to pass something to the view every time. I'm lazy, right? I'm assuming that this is the same if I used response instead of session. In web2py you didn't have to pass response to the view, it was automatically available. -Jim On Tue, Jan 21, 2020 a

Re: [web2py] Re: py4web - javascript references in html files

2020-01-21 Thread Jim Steil
I tried using URL() but then the login page didn't work. I think there was an error starting Vue. -Jim On Tue, Jan 21, 2020 at 1:04 AM Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Good question. Not sure there is a way that is best. > You are free to use URL everywhere but often it

[web2py] Re: Displaying for loop results only once

2020-01-21 Thread Tim Nyborg
Simplest fix: use "any" instead: {{for bookings in bookings:}} {{if any(bookings.company in q.customer.company for q in quotes):}} Quoted {{pass}} {{pass}} To avoid all this looping, you could have a separate query join the two tables and count the matches. On Saturday, 18 January 20

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

2020-01-21 Thread Tim Nyborg
Yes, that should work. I have three web2py instances on a server running nginx/uwsgi, and the principle's the same: slightly different configs for each instance, pointing to separate source files. On Tuesday, 21 January 2020 11:37:55 UTC, Manuele wrote: > > Hi! > > If I need to manage on the s

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

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

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) - http://github.com/web

[web2py] Re: Py4web: ¿Practical example step by step?

2020-01-21 Thread Dave S
On Monday, January 20, 2020 at 4:55:33 AM UTC-8, Yuver Parra wrote: > > > Good morning and thanks in advance for sharing your knowledge in this > group. > Do any of you have a practical example where you can follow step by step > learning from the installation of py4web to the setting up of a s

[web2py] Re: Web2py - How would I monitor an existing running script?

2020-01-21 Thread Dave S
On Monday, January 20, 2020 at 10:55:28 PM UTC-8, Simon Dreyer wrote: > > Hi Folks, I have an existing python application that reads data from > industrial controllers and publishes it to a message queue. The application > is currently headless and logs errors and events to a log file. I would

Re: [web2py] No driver of supported ones ('psycopg2',) is available

2020-01-21 Thread Dave S
On Monday, January 20, 2020 at 10:15:29 AM UTC-8, Lovedie JC wrote: > > I had to copy it, the folder to Web2py modules folder for it to work. You > can also copy to Web2py site packages folder. > Regards > > On Mon, Jan 20, 2020, 20:53 'Annet' via web2py-users < > web...@googlegroups.com > wrot

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

2020-01-21 Thread Dave S
On Monday, January 20, 2020 at 8:49:13 AM UTC-8, Manuele wrote: > > 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 > con