[web2py] webp2y XML helper sanitize line breaks under python3.6

2020-02-11 Thread Clemens
sanitize (e.g. less than or greater than, I need these, since if there is no description it is generated as ). How can be line breaks sanitized by the XML helper running web2py under Python3? Thanks for any support! Best regards Clemens -- Resources: - http://web2py.com - http://web2py.com/b

Re: [web2py] webp2y XML helper sanitize line breaks under python3.6

2020-02-12 Thread Clemens
nd this solution worked very well with python 2.7, having even line breaks in link titles. Then I moved to python 3.6 and the problem was there. Thus, I think, that the XML sanitizer under Python 3.6 is the problem, since it can't handle Do you have any other ideas? Best regards Clemens

[web2py] Re: special chars in view, utf8 issue ?!

2020-02-12 Thread Clemens
label = label.decode('utf-8') > label = cgi.escape(label) > label = label.encode('ascii', 'xmlcharrefreplace') > > return label > Have a try! Hope it helps! Best regards Clemens On Wednesday, February 12, 2020 at 12:12:41 PM UTC+1, Ramo

Re: [web2py] webp2y XML helper sanitize line breaks under python3.6

2020-02-12 Thread Clemens
racter are no problem. I really think, that the XML sanitizer under python 3.6 is the problem. Do you have an idea for a work around except of eliminating all line breaks, cause I can't do this? Best regards Clemens On Wednesday, February 12, 2020 at 4:42:53 PM UTC+1, Christian Vara

Re: [web2py] webp2y XML helper sanitize line breaks under python3.6

2020-02-13 Thread Clemens
Tim Nyborg has got the solution: It's a bug in yatl/sanitizer.py, which can be fixed as described: https://stackoverflow.com/questions/60176267/webp2y-xml-helper-sanitize-line-breaks-under-python3 Thanks Tim! On Wednesday, February 12, 2020 at 5:17:31 PM UTC+1, Clemens wrote: > &g

[web2py] Re: psycopg2 error

2020-02-13 Thread Clemens
Have you installed the corresponding python 3 lib for postgres? *pip3* install --no-binary :all: --upgrade psycopg2 What's your os? I'm using Linux and I switched to python 3, also using postgres and I have no problems with psycopg2. Best regards Clemens On Wednesday, February 5, 20

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

2020-02-14 Thread Clemens
mplemented. And what do you think will be a factor (e.g. in percentage of the original implementation effort) to switch an application from web2py to py4web? Thanks in advance for a short answer! Best regards Clemens On Monday, February 10, 2020 at 5:13:56 PM UTC+1, Massimo Di Pierro wrote: &

[web2py] Re: Many records in one transaction

2020-02-17 Thread Clemens
://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Combining-rows If your problem is a timeout while reading the database, this could be a solution. Best regards Clemens On Monday, February 17, 2020 at 7:09:57 AM UTC+1, Константин Комков wrote: > > Hello! I do

[web2py] Re: Redirect with code 301

2020-02-17 Thread Clemens
e_Record>. The other way around redirecting from an outside domain to pythonanywhere is described here: https://help.pythonanywhere.com/pages/CustomDomains/ But just try to contact pythonanywhere's service by writing a mail. They will try to help as they always do. Best regards Cle

[web2py] Future of web2py

2020-02-18 Thread Clemens
ented. And what do you think will be a factor (e.g. in percentage of the original implementation effort) to switch an application from web2py to py4web? Thanks in advance for a short answer! Best regards Clemens -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - ht

[web2py] Re: Searching by date using SQLFORM.factory

2020-02-19 Thread Clemens
Hi, is your problem receiving no result or the wrong result? How is the table definition of your birthday table and why is the birthday not just a field a corresponding person table? Best regards Clemens On Wednesday, February 19, 2020 at 10:49:11 PM UTC+1, mostwanted wrote: > > I&#x

[web2py] Re: Problem with python3 / pdf output (encoding): UnicodeDecodeError utf-8 invalid continuation byte

2020-02-28 Thread Clemens
= cgi.escape(label) label = label.encode('ascii', 'xmlcharrefreplace')return label* Have a try, hope it helps! Best regards Clemens On Friday, February 28, 2020 at 10:15:04 AM UTC+1, Silvan Marco Fin wrote: > > Hi! > I have a problem with pdf output running in

[web2py] web2py online debugger under python3

2020-03-30 Thread Clemens
LTS What do I have to change additionally that the online debugger is working under python3? Thanks a lot for any support! Best regards Clemens -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web

[web2py] Re: how to execute web2py with Rocket using SSL?

2020-04-24 Thread Clemens
he solution would solve "my" problem too. In the meantime I've established short script switching between Python 2.x and 3.x. Means, using Python3 as long as I don't have to use the debugger and switching to Python 2 if required. The script is running under Linux. Any interes

Re: [web2py] Re: how to execute web2py with Rocket using SSL?

2020-04-24 Thread Clemens
ction it's fine for me but not for development. Thus, I still hope there will be a solution for the rocket-socket-prob. Best regards Clemens On Friday, April 24, 2020 at 5:20:42 PM UTC+2, VJ Sosa wrote: > > Thanks Jim, > > I will follow your advice on using Nginx. > How

Re: [web2py] Re: how to execute web2py with Rocket using SSL?

2020-04-24 Thread Clemens
Sure! But now I have to make fire for the kids and their stick breads :-) I will clean up my notes on Sunday and send here. Have a nice weekend! On Friday, April 24, 2020 at 5:44:40 PM UTC+2, Jim S wrote: > > Clemens > > Can you share that PDF with all of us when you have it comple

[web2py] Re: web2py online debugger under python3

2020-04-26 Thread Clemens
Firefox On Sunday, April 26, 2020 at 8:46:00 AM UTC+2, Massimo Di Pierro wrote: > > what browser? > > On Monday, 30 March 2020 13:23:57 UTC-7, Clemens wrote: >> >> Hello everybody! >> >> I've switched my web2py app from python2 to python3. The app its

Re: [web2py] Re: how to execute web2py with Rocket using SSL?

2020-04-26 Thread Clemens
ay in Wisconsin! I will do the same on this sunny day in Germany. Clemens On Sunday, April 26, 2020 at 4:30:36 PM UTC+2, Jim S wrote: > > Clemens > > Thank you for this. I hope to get to reinstalling my servers this week > and will use this and the web2py document as a base. F

[web2py] Re: web2py and ubuntu 20lts

2020-05-01 Thread Clemens
Hi Maurice, obviously you're trying to execute your pythone-2-compiled code with python 3 (Ubuntu 20 default). Have a try recompiling it with python 3.x. Does this solve the problem? Regards Clemens On Friday, May 1, 2020 at 7:24:34 AM UTC+2, Maurice Waka wrote: > > I recent

[web2py] Re: How to debug appadmin CSV uploading

2020-05-01 Thread Clemens
ble_name].drop() db.commit() Hope it helps! Regards Clemens On Friday, May 1, 2020 at 8:57:38 AM UTC+2, Jonsubs wrote: > > Hi everyone, > I'm trying to upload a CSV file to my MySQL database using appadmin. > > I do get a "data uploaded" flash message as if I succeede

[web2py] Re: SQLFORM with extra_fields

2020-05-01 Thread Clemens
_value=biz_unit_dict[biz_unit_title]) \ for biz_unit_title in sorted(biz_unit_dict)]))) form[0].insert(-1, biz_unit) Hope it helps! Best regards Clemens On Friday, May 1, 2020 at 5:53:36 PM UTC+2, Jim S wrote: > > Anyone have experience with using 'extra_fields

[web2py] Re: Importing a CSV file from the Database form fails

2020-05-03 Thread Clemens
Have a look on how you open the file to be imported: python2: open(filename, 'rb') python3: open(str(filename), 'r', encoding='utf-8')) Hope, it helps! Regards Clemens On Thursday, March 5, 2020 at 10:07:27 AM UTC+1, Andrew Rogers wrote: > > Hi > &

[web2py] Re: web2py online debugger under python3

2020-05-04 Thread Clemens
. The debugger doesn't catch the breakpoint, set in my code. Instead, after waiting a few minutes I got the following new situation: [image: Screenshot_2020-05-04 interact.png] [image: Screenshot_2020-05-04 interact-02.png] Do you have any idea, how I can fix this? Best regards Clemens On Sun

Re: [web2py] Re: web2py online debugger under python3

2020-05-05 Thread Clemens
Hi Andrew, well, I would say, it's because I ever used it and it's okay for me. But which one would you recommend? And how to connect your favorite debugger with web2py? Never used another debugger for web2py. Regards Clemens On Tuesday, May 5, 2020 at 1:56:25 AM UTC+2, AGRo

[web2py] Re: uwsgi from python2.7 to python3

2020-05-21 Thread Clemens
Have you already installed the python-3-uwsgi-lib? *pip3* install --no-binary :all: --upgrade uwsgi Have a try! Regards Clemens On Wednesday, May 20, 2020 at 6:24:56 PM UTC+2, Ramos wrote: > > hello i´m using webfaction and this script > > https://github.com/duducosmos/webfaction-

[web2py] Re: Upgraded to 2.19 and SQL Server date insert throws an error

2020-06-01 Thread Clemens
Have you already tried the latest version 2.20.4-stable+timestamp.2020.05.03.05.18.50 ? On Monday, June 1, 2020 at 8:12:08 PM UTC+2, Seth J wrote: > > I am running IIS connecting to SQL Server. Upgrade seems to have > introduced an error to an othe

Re: [web2py] Re: web2py online debugger under python3

2020-06-04 Thread Clemens
Hi Andrew, I've switched over to PyCharm and really like it. Thanks a lot for the push! Best regards Clemens On Wednesday, May 6, 2020 at 3:11:00 AM UTC+2, AGRogers wrote: > > Hi Clemens > > I think a standalone debugger is much better. The online debugger could be

Re: [web2py] web2py book error ImportError: Requires pygments module, but it is not available

2020-07-20 Thread Clemens
Hi, I'm also using Python 2 and 3 in parallel. I'm not using Pygments but other pipped libraries. And I'm using pip for the Python2 version and pip3 for Python3 version. Having installed both versions I'm just running Python 2 or 3 and the right library is linked. Furthermore I'm using update-

[web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Clemens
u want to archive by this? Maybe there is an easier way for that. Best regards Clemens On Saturday, August 1, 2020 at 12:34:45 AM UTC+2, Rob Paire wrote: > > Hi All, > I am trying to send data entered into the contenteditable feature of a row > object using a Web2py AJAX call, and it

[web2py] Re: data-tooltip from stupid.css gens exception when placed as an attribute into web2py html tag functions

2020-08-01 Thread Clemens
Hi, it doesn't solve your problem. But why not using _title attribute for the standard tooltip functionality? https://www.w3schools.com/html/tryit.asp?filename=tryhtml_attributes_title Regards Clemens On Saturday, August 1, 2020 at 7:02:28 AM UTC+2, Niktesla001 wrote: > > Hello the

[web2py] Re: Form input for date does not start the calendar date picker

2020-08-03 Thread Clemens
pe='date', _value=datetime.now().strftime('%Y-%m-%d') form[0].insert(-1, valid_thru) And it works, with a preset value of today. Hope it helps! Best regards Clemens On Monday, August 3, 2020 at 2:48:34 AM UTC+2, Vlad wrote: > > Ok so I have this *non-SQLFORM* form

[web2py] Re: unicode symbols

2020-08-18 Thread Clemens
A(XML('❌'), ...) On Tuesday, August 18, 2020 at 1:29:19 PM UTC+2 Dirk C wrote: > Hello, > I wonder if i can replace the string 'mytext' with a unicode symbol like > ❌ > > {{=A('mytext',callback=URL(r=request,f='ltb_wijzig_groepssamenstelling' > ,vars=dict(v_groepslid_id=groepslid.id > ,v_dossier

[web2py] Re: How to improve a widget select list that allows new options to be added?

2020-08-18 Thread Clemens
e updated. For further information on extra fields in an SQLFORM --> http://web2py.com/books/default/chapter/29/07/forms-and-validators#Adding-extra-form-elements-to-SQLFORM Have a try, hope it helps! Best regards Clemens On Tuesday, August 18, 2020 at 2:32:57 PM UTC+2 roge...@gmail.com wrot

[web2py] Re: count() with left join

2020-08-20 Thread Clemens
n the rows object. It's not perfect, but it works :-) Best regards Clemens On Thursday, August 20, 2020 at 8:52:15 PM UTC+2 Jim S wrote: > Hi > > I'm trying to get the count of records to be returned in a query using: > > db(query).count() > > Adding complexit

[web2py] Re: fake_migrate=True is not working

2020-08-24 Thread Clemens
e a closer look. Best regards Clemens On Monday, August 24, 2020 at 11:18:32 AM UTC+2 and...@gmail.com wrote: > Hello, if I chose migrate= False and fake_migrate=True the .tables in > databases folder are not created. > Why? > I'm attaching appconfig.ini and py.db and my custom

Re: [web2py] Re: fake_migrate=True is not working

2020-08-27 Thread Clemens
- Do your have direct access to the database (w/o web2py) using this user/password account? (sorry for that question, but sometimes it's that easy :-) - Are there any .table files already in your database folder? Since it's fresh new database I would set fake_migrate to false

[web2py] Re: login validation

2020-08-30 Thread Clemens
Have a look here: http://web2py.com/books/default/chapter/29/09/access-control#Decorators Should be something like @auth.requires(auth.is_valid==True) On Sunday, August 30, 2020 at 2:11:08 PM UTC+2 and...@gmail.com wrote: > Hello, maybe it's easy but I don't know exactly if it's possible. > I

[web2py] Re: Having a function always running in the background

2020-09-01 Thread Clemens
ve no output in the DIV, the user won't see anything about your mailer. Could this be an solution for you? If yes, do you know what to do or do you need more detailed information? Regards Clemens On Tuesday, September 1, 2020 at 3:41:27 PM UTC+2 mostwanted wrote: > > Is there a way to

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

2020-09-09 Thread Clemens
Does request.env.http_host gives us the information you want? On Wednesday, September 9, 2020 at 4:36:38 PM UTC+2 Manuele wrote: > 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

[web2py] Re: Sessions management and Firefox langage

2020-09-10 Thread Clemens
From https://blog.mozilla.org/l10n/2019/04/02/changing-the-language-of-firefox-directly-from-the-browser/ *Language SettingsIn Firefox there are two main user facing settings related to languages:* - *Web content: when you visit a web page, the browser will communicate to the server

[web2py] Re: Sessions management and Firefox langage

2020-09-10 Thread Clemens
; to the users language by: T.force(auth.user.lang) That's my favorite. I first thought, you would like to have automatic language selection by the browser. But letting the user to decide has the further advantage, that e.g. a German user working with an English browser can still have a Germ

[web2py] Re: from gluon.storage import Storage

2020-09-17 Thread Clemens
It's possible as described here http://web2py.com/books/default/chapter/29/04/the-core?search=cache#cache Have a look there. If the information doesn't help you, let me know. I did it once (via cache.ram) and can therefore provide an example if needed. Best regards Clemens O

[web2py] Re: Streaming pdf in a browser

2020-09-24 Thread Clemens
iew in default browser) by response.title = 'Your Document Title' response.headers['Content-Type'] = 'application/pdf' response.headers['Content-Disposition']='attachment; filename= {}.pdf'.format(request.vars.filename) retur

[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-10-06 Thread Clemens
documented (finding a solution for every problem), it's absolutely stable, it can be expanded by packages, you have things like a table of contents ... Long story short: I like it! Regards Clemens On Thursday, October 1, 2020 at 4:58:39 PM UTC+2 DenesL wrote: > > While searching for a

[web2py] Re: Limiting database entries

2020-10-14 Thread Clemens
independent on what database you use. I'm not sure if the solution fits your requirement. Does it? Regards Clemens On Wednesday, October 14, 2020 at 4:42:05 PM UTC+2 Jim S wrote: > I'm not entirely clear on what you're asking for. > > Are you trying to limit the number of

[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-11-01 Thread Clemens
. If you want to evaluate this way and you need some more assistance, please let me know. Best regards Clemens On Saturday, October 31, 2020 at 11:29:53 PM UTC+1 DenesL wrote: > @roger: you are welcome. > @villas: probably reportlab. > @ramos: reportbro is open-source license for non-

[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-11-02 Thread Clemens
Hi, you can realize absolute positioning by the TeX package texpos <https://ctan.org/pkg/textpos>. But I don't know PollyReports very well, I only heard of it. Thus, do you have an example PDF on what you want to generate? Regards Clemens On Monday, November 2, 2020 at 12:51:

[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-11-02 Thread Clemens
> Rule((36,12),650), > ]) > rep.pagefooter = B([ E((72*7, 0), H, sysvar = "pagenumber", format = > lambda x: f"[{now}] Order {so} page {x}"), ]) > rep.detailband = B([ E((52,0), H, getvalue=lambda r: r[1]+1, align=R), > E((90,0), H, key=2), E((166,0), H, ke

[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-11-02 Thread Clemens
s way and you need assistance on a specific problem, please let me know. Or if you want to handle things more subtle (e.g. error handling of the TeX compiling), I can provide you more code snippets. It's up to you to decide. I like TeXing my reports since there are no limits in formatti

[web2py] Re: uWSGI Permission denied

2020-11-04 Thread Clemens
tion works well. https://groups.google.com/g/web2py/c/BFvo2tn9IAI/m/GsIBbiVkAwAJ Or you can even use the Ansible Playbook provided by Jim: https://groups.google.com/g/web2py/c/BFvo2tn9IAI/m/nQMgO7HRBAAJ Hope, this helps! Best regards Clemens On Wednesday, November 4, 2020 at 2:10:52 PM UTC+

[web2py] Re: Error: Connection lost during download

2020-11-10 Thread Clemens
If I had to guess, I'd say, that your web server is running in a timeout while downloading such a large file. Best regards Clemens On Tuesday, November 10, 2020 at 6:41:35 PM UTC+1 SR wrote: > Hi > I store my uploaded file in the web2py "static" folder. > One of the

[web2py] Re: Error: Connection lost during download

2020-11-10 Thread Clemens
x27;m sure it is), I could be a restriction in the size of the data transferable per request. But please first try to increase the timeout. Clemens On Tuesday, November 10, 2020 at 10:20:52 PM UTC+1 Jim S wrote: > That depends on your software stack. > > Where is this hosted? > >

[web2py] Re: python-psycopg2 on ubuntu 20

2020-11-11 Thread Clemens
sudo -H pip3 install --no-binary :all: --upgrade psycopg2 On Wednesday, November 11, 2020 at 3:27:25 PM UTC+1 ermolaev...@gmail.com wrote: > where find *python-psycopg2 for Ununtu 20?* > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Re: Cloning DB with Web2py

2020-11-25 Thread Clemens
; db.import_from_csv_file(open(str(filename), 'r', encoding='utf-8')); db.commit() or for python2 >>> db.import_from_csv_file(open(filename, 'rb')); db.commit() Regards Clemens On Wednesday, November 25, 2020 at 6:53:45 PM UTC+1 gaelpri...@gmail.com wrote:

[web2py] Re: Cloning DB with Web2py

2020-11-25 Thread Clemens
path to the csv file and not only the filename? Regards Clemens On Wednesday, November 25, 2020 at 9:14:30 PM UTC+1 gaelpri...@gmail.com wrote: > Thank you Clemens. > > I'm using Python2. > I was thinking about moving from PosgreSQL to MariaDB becuse the > 'import_f

[web2py] Re: Changing main repo and database model modifications

2020-12-07 Thread Clemens
roblem you can easily recover the old database directory with the original .table files. Regards Clemens On Monday, December 7, 2020 at 2:04:15 PM UTC+1 Jonsubs wrote: > Hi all, > I want to change the main repo copy from which I work but when I do it I'm > not longer capable of mo

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Clemens
Hello Jon, yes, this should do it. It's also fine to import an export of an existing DB. But you can just start your application, this should create the .table files at the first, I think. Regards Clemens P.S.: Concerning migrate and fake_migrate options have a look there:

[web2py] Re: Is it possible to write to session variables from Web2py modules?

2021-01-23 Thread Clemens
Just reference the session in the module by: session = current.session Then you can use exactly in the same way as in the controllers. Best regards Clemens On Thursday, January 21, 2021 at 8:01:36 AM UTC+1 at wrote: > Is it possible to write to session variables from Web2py modu

[web2py] Re: multi user login in same browser

2021-02-28 Thread Clemens
Hi, just closing the tab does not clear the session. Try closing the browser or start another instance via Incognito/Private mode to have two user logged parallel on the same machine. Regards Clemens On Saturday, February 27, 2021 at 11:44:09 PM UTC+1 黄祥 wrote: > *step* > 1. crea

[web2py] Re: trying to load .w2p appliance from local directory

2021-04-16 Thread Clemens
Did you finally press the Install button after naming the application and selecting the w2p file? Because that's the way it always work. Regards Clemens On Friday, April 16, 2021 at 7:27:30 PM UTC+2 james c. wrote: > This was an app being developed on windows and was saved as an a

[web2py] Re: anywhere.py rocket admin on port 80 no ssl

2021-04-16 Thread Clemens
You have just to set the appadmin password manually as described here: http://web2py.com/books/default/chapter/29/13/deployment-recipes?search=save_password#Setting-password On Friday, April 16, 2021 at 2:06:41 PM UTC+2 lucas wrote: > maybe a common question. how do i allow access to the admin i

[web2py] Re: educational

2021-04-16 Thread Clemens
() gives you a blueprint on how to do it. Regards Clemens On Saturday, April 3, 2021 at 2:59:44 AM UTC+2 Wep2buy wrote: > Hi, > > How can i have an application, that interrupt the users (entering data > through form) and doing saving/submitting of the current content of the >

[web2py] Re: cant import exported file from appadmin

2021-06-11 Thread Clemens
fore re-importing the database, first drop all tables. Have a try, hope it helps! Best regards Clemens On Friday, June 11, 2021 at 11:44:52 AM UTC+2 黄祥 wrote: > *step to reproduce* > 1 create new app > 2 edit db.py at the bottom : > db.define_table('mytable', Field('my

[web2py] Re: sqlform insert row id

2021-06-30 Thread Clemens
the insert returns the id of the new record. new_id = db.table.insert(...) Have a try! On Wednesday, June 30, 2021 at 11:51:08 PM UTC+2 snide...@gmail.com wrote: > If SQLFORM.process() accepts the form and does an insert, is there a > variable the controller or view can use to get the id of th

[web2py] Re: sqlform insert row id

2021-07-02 Thread Clemens
You can use validate() instead of process(): if form.validate(): ... new_id = db.table.insert(...) ... http://web2py.com/books/default/chapter/29/07/forms-and-validators#The-process-and-validate-methods Regards Clemens On Thursday, July 1, 2021 at 8:47:34 PM UTC+2 snide

[web2py] Re: web2py cannot import csv return strings not byte

2021-10-13 Thread Clemens
Have a look here: https://groups.google.com/g/web2py/c/HGTQlEVc2qw/m/toCPLKKwCAAJ Best regards Clemens On Wednesday, January 6, 2021 at 12:09:14 AM UTC+1 lcham...@gmail.com wrote: > *To Reproduce* > > Steps to reproduce the behavior: > >1. Create a new project(*New sim

[web2py] Re: Displaying database information without repeating details

2021-10-27 Thread Clemens
Have a look here: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#groupby-having Combining this with: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#sum-avg-min-max-and-len Is it what you need? Best regards Clemens On

[web2py] Re: How to edit boolean fields via one dropdown widget

2021-11-16 Thread Clemens
this, please let me know. Best regards Clemens On Sunday, November 14, 2021 at 12:29:14 PM UTC+1 spamf...@gmail.com wrote: > I have a table with two boolean fields. All four combinations used to be > meaningful, but now only three are. > > I'd like to present the three options in

[web2py] Re: Limiting the number of values that could be input in a form field

2021-12-08 Thread Clemens
I didn't test it, but this should do the job: requires = IS_MATCH('^\w{1,9}$', error_message='must be 1 to 9 characters/digits') For further information about validators with regular expressions have a look here: http://web2py.com/book/default/chapter/07?search=formstyle#IS_MATCH On Wednesday,

[web2py] Re: Limiting the number of values that could be input in a form field

2021-12-08 Thread Clemens
The right link to the chapter in the web2py documentation is: http://web2py.com/books/default/chapter/29/07/forms-and-validators#IS_MATCH On Wednesday, December 8, 2021 at 8:35:17 PM UTC+1 Clemens wrote: > I didn't test it, but this should do the job: > requires = IS_MAT

[web2py] Re: Creating a validator to limit the number of table entries

2021-12-12 Thread Clemens
Hello! Your are not referencing the parent table. I think, what you want to address, is as follows: if db((db.*parent*.id>0) & (db.children.parent==parent.id)).count() >=10: ... Then the error should not occur and you are get all parents with more than 10 children. Regards Cl

[web2py] Re: Creating a validator to limit the number of table entries

2021-12-12 Thread Clemens
Now parent is a valid row object, that can be referenced by parent.id. If it delivers what you want to, it's fine! Best regards Clemens On Sunday, December 12, 2021 at 2:42:31 PM UTC+1 mostwanted wrote: > So i decided to do this & seems to be working, I hope it fall apart, > p

[web2py] Re: Keeping track of database entires

2021-12-13 Thread Clemens
gin: https://stackoverflow.com/questions/18902549/web2py-redirect-after-login Is it what you want? Best regards Clemens On Monday, December 13, 2021 at 6:27:10 AM UTC+1 mostwanted wrote: > Is there a way of keeping track of table entries? I have to create a > function that shows a pop-up warni

[web2py] Re: Unable to save pdf documents in my app

2022-03-30 Thread Clemens
create it. I guess the return value of Popen will tell you. Maybe it helps. Regards Clemens On Tuesday, March 29, 2022 at 8:00:20 AM UTC+2 mostwanted wrote: > Guys my app suddenly wont save PDF documents. > > > *db.define_table('pdfs', > Field(&#

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

2022-08-01 Thread Clemens
I'm using a similar configuration (Ubuntu instead of Debian, but that's no big difference). Thus, have a try with *pip3* install psycopg2 to make sure, you're using the python 3 lib. Works for me :-) On Monday, August 1, 2022 at 5:14:31 PM UTC+2 Massimiliano wrote: > Try to install psycopg2-bin

[web2py] Re: gmail smtp and password retrieval

2022-08-17 Thread Clemens
Generate an app password, as follows: https://support.google.com/mail/answer/185833?hl=en This should solve it, hopefully. Regards Clemens On Wednesday, August 17, 2022 at 5:20:49 PM UTC+2 lucas wrote: > hey one and all, > > on May 5th, 2022, gmail imposed the 2 step verification on

[web2py] Re: gmail smtp and password retrieval

2022-08-17 Thread Clemens
Hmm, should work, since it's the right port for ssl. Maybe setting tls to false could make it work, since the tls port is 587. Have a try! Hope it helps! Clemens On Wednesday, August 17, 2022 at 5:57:56 PM UTC+2 lucas wrote: > oh, so the latter is still not sending the Lost Password

[web2py] Re: gmail smtp and password retrieval

2022-08-17 Thread Clemens
Hm, one last guess: ssl false, tls true and port 587. On Wednesday, August 17, 2022 at 6:12:50 PM UTC+2 lucas wrote: > nope, that didn't work either. uhm. > > On Wednesday, August 17, 2022 at 12:08:12 PM UTC-4 Clemens wrote: > >> Hmm, should work, since it&#

[web2py] Re: web2py 2.23.0 is giving a 403 error when I try to package my applications

2023-01-09 Thread Clemens
Just a guess: What python version are you using? If you're still using python 2, it could be the reason. On Monday, January 9, 2023 at 10:55:21 AM UTC+1 david@gmail.com wrote: > Which is in turn caused by: > > *def app_pack*(app, request, raise_ex=False, filenames=None): > """Builds a w2

[web2py] Re: Attribute name with a dash character using helpers

2023-07-27 Thread Clemens
the attributes as a dictionary and make use of Python's ** function arguments notation, which maps a dictionary of (key:value) pairs into a set of keyword arguments: >>> print DIV('text', **{'_data-role': 'collapsible'}) text Regards Clemens On Thurs

[web2py] Re: Possible bug with SQLFORM.grid search and order

2023-08-11 Thread Clemens
://py4web.com/_documentation/static/en/chapter-15.html Best regards Clemens On Friday, August 11, 2023 at 6:55:48 PM UTC+2 douginc...@gmail.com wrote: > Hello Jeff, > I've posted a here but it seems to be pending approval. I notice no > responses to your post. Is this site dead? Is We

[web2py] Re: Possible bug with SQLFORM.grid search and order

2023-08-12 Thread Clemens
oo. The community is very active but is already migrated to py4web ;-) Thus, start with py4web. Best regards Clemens On Friday, August 11, 2023 at 9:30:18 PM UTC+2 douginc...@gmail.com wrote: > Thank you Clemens, > The differences between web2py and py4web seem minor. Would you sugge

[web2py] Re: Possible bug with SQLFORM.grid search and order

2023-08-12 Thread Clemens
Here they are :-) https://groups.google.com/g/py4web/ On Saturday, August 12, 2023 at 8:36:50 PM UTC+2 douginc...@gmail.com wrote: > HI Clemens, > > I noticed the latest post in the py4web label is 3 years old. Where could > I find the latest py4web posts? > > thanks agai

[web2py] Re: Extracting just submitted details in a redirect

2023-08-20 Thread Clemens
Hi, could it be that the problem is, you're passing the students name (vars={'student_name': student_name}) but then reference to form.vars.student as student.id? Regards On Sunday, August 20, 2023 at 1:04:51 PM UTC+2 mostwanted wrote: > I have a student registration form that immediately aft

[web2py] Re: administrator login with 2fa

2023-08-29 Thread Clemens
Try enabling 2FA via the following setting, since this is for all users: *auth.settings.auth_two_factor_enabled = True* Regards Clemens On Tuesday, August 29, 2023 at 6:09:26 PM UTC+2 Ramos wrote: > i just activated the two step auth with this > > auth.settings.two_factor_authenticat

Re: [web2py] Re: administrator login with 2fa

2023-09-01 Thread Clemens
path ;-) Regards from Germany Clemens On Friday, September 1, 2023 at 5:53:34 PM UTC+2 Jim S wrote: > So, are you trying to protect the 'admin' application with 2fa? > > If so, can you add the 2fa code to the admin app? > > I haven't tried this before > > On Fri

Re: [web2py] Re: administrator login with 2fa

2023-09-01 Thread Clemens
for exempt_user in db( >>>>>> # (db.auth_user.mfa_override >= >>>>>> datetime.datetime.now()) >>>>>> # & (db.auth_user.active == True) >>>>>> # ).select(): &

Re: [web2py] Re: administrator login with 2fa

2023-09-01 Thread Clemens
I don't and I that's why I (re)move these to a hidden folder on system level :-) What I need is to give customers the option to add new users by themselves. For that I've written a small controller under the control of 2FA and so on. Regards Clemens On Friday, September 1, 202

Re: [web2py] Re: administrator login with 2fa

2023-09-03 Thread Clemens
insecure channel >> >> Isn't that just the default behavior? >> >> -Jim >> >> On Friday, September 1, 2023 at 1:00:08 PM UTC-5 Clemens wrote: >> >>> I don't and I that's why I (re)move these to a hidden folder on system >>> le

[web2py] Re: pyodbc error on windows machine

2023-09-07 Thread Clemens
Just because I've just read this a few minutes ago ... don't think this is the reason, but check it out or just be informed: https://www.securonix.com/blog/securonix-threat-labs-security-advisory-threat-actors-target-mssql-servers-in-dbjammer-to-deliver-freeworld-ransomware/ On Thursday, Septembe

[web2py] Re: How do I query and display Authors and their respective books

2023-10-10 Thread Clemens
Hello, all you need to know (including examples) is described here: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#One-to-many-relation On Wednesday, October 11, 2023 at 6:11:38 AM UTC+2 Moiz Nagpurwala wrote: > Hello, > > I have 2 tables in my database, one for

[web2py] Re: web2py -> py4web

2024-07-14 Thread Clemens
py. I would like to migrate to py4web. The only but big obstacle is time. As soon as I find the time I'm gonna move to py4web. Thanks a lot for web2py and your work! Best regards Clemens On Sunday, July 14, 2024 at 4:10:05 AM UTC+2 Massimo Di Pierro wrote: > Hello everybody, > >

[web2py] Re: Web2py move to a new server resulted in this 'CommonDialect' object has no attribute 'eq'

2024-08-16 Thread Clemens
objects.py", line 1558, in __eq__ return Query(self.db, self._dialect.eq, self, value) Thanks a lot for your support! Best regards Clemens On Sunday, October 29, 2023 at 7:29:29 PM UTC+1 Massimo Di Pierro wrote: This is a know issue with has been fixed in master. I will release a n

[web2py] Re: Web2py move to a new server resulted in this 'CommonDialect' object has no attribute 'eq'

2024-08-16 Thread Clemens
Hello Massimo, it seems, that an existing database was wrongly migrated, because with a fresh database, everything works fine! Thus, there is obviously no pydal problem and nothing to do for you :-) But thanks a lot for web2py and all your support!!! Best regards Clemens On Friday, August

Re: [web2py] Re: Centos 7 uwsgi no driver for psycopg2

2022-04-01 Thread Dr. Clemens R. Odendahl
I think, that Jims answer is right. Have a try sudo-pip psycopg2 (--> sudo -H) Regards Clemens On 31.03.22 18:33, urban@gmail.com wrote: Am I correct in assuming this error is occurring because python