[web2py] Re: web2py -> py4web

2024-07-17 Thread Jim S
I have moved most everything to py4web except for 3 big apps. However, we are migrating our ERP to Odoo and then these web2py apps will no longer be needed. Hope to have Python 2.7 support in web2py through March of 2025. We should be off by then. That being said, I doubt I'll be downloading/in

Re: [web2py] Re: web2py 2.26.1 released

2023-10-30 Thread Jim S
I highly recommend moving to py4web. These days I dread working on web2py apps we haven't yet converted to py4web. py4web is so much faster for execution and development. Much more flexibility in form and grid layouts. If there is something missing, let us know, we'd love to get more people

[web2py] Re: Web2py dal significantly slower than raw query

2023-10-02 Thread Jim S
gt; Asking here if anyone knows an obvious reason for this that I am missing. > On Monday, October 2, 2023 at 5:53:47 PM UTC+2 Jim S wrote: > >> It's possible I'm reading this wrong (it is Monday morning), but .09s >> (DAL) is faster than 1.8s (raw SQL). >> >&

[web2py] Re: Web2py dal significantly slower than raw query

2023-10-02 Thread Jim S
It's possible I'm reading this wrong (it is Monday morning), but .09s (DAL) is faster than 1.8s (raw SQL). Is that a typo? Or, is it my Monday-morning-brain? If your raw query is slower, could it be because you're converting to a dict instead of a list as in your dal query? -Jim On Monday,

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

2023-09-01 Thread Jim S
forward them to me in an email. -Jim On Friday, September 1, 2023 at 1:04:47 PM UTC-5 Jim S wrote: > If I try to go to admin/appadmin web2py returns: > > Admin is disabled because insecure channel > > Isn't that just the default behavior? > > -Jim > > On Friday,

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

2023-09-01 Thread Jim S
> 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, 2023 at 7:40:19 PM UTC+2 Jim S wrote: > &g

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

2023-09-01 Thread Jim S
on the admin app and it just does not work. >> :) >> >> >> Em sex., 1 de set. de 2023 às 16:53, Jim S escreveu: >> >>> So, are you trying to protect the 'admin' application with 2fa? >>> >>> If so, can you add the 2fa code to the a

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

2023-09-01 Thread Jim S
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 Friday, September 1, 2023 at 10:24:29 AM UTC-5 Ramos wrote: > this admin > > https://mysite.com/admin > > Em sex., 1 d

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

2023-09-01 Thread Jim S
the administrator password. Only created users.* > *That is my question, how to force administrator to use 2fa ?* > *regards* > *António* > > Em sex., 1 de set. de 2023 às 15:00, Jim S escreveu: > >> Here is the code I wrote that only enforced 2fa for users outside our >>

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

2023-09-01 Thread Jim S
Here is the code I wrote that only enforced 2fa for users outside our local networks. There is some commented out code there that additionally allowed me to specify users in a group so only that group was force to 2fa def _two_factor_required(auth_user): """ check whether we need to enf

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

2023-08-14 Thread Jim S
@doug - I would highly recommend looking at py4web over web2py. web2py is a fantastic tool, but seems its time has passed. py4web uses lots of the same concepts and tools, but is re-architected to be more efficient. There are a few of us that usually always active on the py4web site. Massimo

[web2py] Re: Exceptional oddity in query processing

2023-05-08 Thread Jim S
I think you want r = (db.badlist.PostDate != None) without the db in front of it. -Jim On Saturday, May 6, 2023 at 6:04:39 PM UTC-5 snide...@gmail.com wrote: > Added missing frame info > > On Saturday, May 6, 2023 at 3:51:43 PM UTC-7 Dave S wrote: > > Why does this > > >- > >*File

[web2py] Re: What is a good way to monitor database changes in web2py?

2022-12-01 Thread Jim S
It also depends on what is making the change. Are the changes all coming from your web2py app, or are there other sources changing the database? If the latter, then callback functions won't do any good. Then I'd look into database triggers or some scheduled program to look for changes. -Jim

[web2py] Re: pyCharm

2022-11-16 Thread Jim S
I too am a PyCharm user. Disappointed the web2py support was dropped. I have switched to py4web for all new development and it works great in PyCharm. I think a lot of others use VS Code. You just need to incorporate the import-trick at the top of each file try: import your web2py object

[web2py] Re: Reset Password does not send email

2022-11-11 Thread Jim S
Are you passing a password to the mail server? When I've set these up with gmail, I've needed an app-specific password to pass to it. -Jim On Thursday, November 10, 2022 at 11:52:34 PM UTC-6 silvia...@gmail.com wrote: > Hello everyone, > > I want to reset password in my application if someone

[web2py] Re: DAL: basic join question

2022-10-26 Thread Jim S
Can you try vrows = db(db.picsntoes.id > 0 ).select(db.pics.ALL, db.picnotes.ALL, left=db.pics.on(db.pics.id == db.picnotes.about)) instead of vrows = db(db.pics.id == db.picnotes.about).select(db.pics.on(db.pics.id == db.picnotes.about)) If that doesn't work, can you share

[web2py] Re: appadmin table view

2022-09-17 Thread Jim S
I think you should be able to define an autocomplete widget and assign it to that field in your model definition. I'm not an appadmin user so don't know for sure. -Jim On Friday, September 16, 2022 at 7:03:21 PM UTC-5 snide...@gmail.com wrote: > It's rather annoying waiting for appadmin to pro

[web2py] Re: Change Form Redirect URL depending on selection

2022-08-26 Thread Jim S
ference auth_user', requires = IS_IN_DB(db, ' > auth_user.id','%(last_name)s')), > Field('email'), > Field('web')) > > that is my controller: > > def partner(): > form = SQLFORM(db.partner, _name='form_partner') > if

[web2py] Re: Change Form Redirect URL depending on selection

2022-08-25 Thread Jim S
Can you share the code you have so far? I'd probably do something like: form = SQLFORM.factory(...your form definition here...) if form.process().accepted: if form.vars.field_1 == 'some test case you want to redirect on': redirect(URL('my_redirect_url', vars=dict(my vars to pass to t

Re: [web2py] Re: pbkdf2(1000,20,sha512)$etc... in v2.22.5

2022-08-19 Thread Jim S
ng and convert it into the > password that is stored in the password in the auth_user table under web2py > version 2.22.5?" > > lucas > > On Thursday, August 18, 2022 at 4:51:41 PM UTC-4 Jim S wrote: > >> I must be misunderstanding something, because tha

Re: [web2py] Re: pbkdf2(1000,20,sha512)$etc... in v2.22.5

2022-08-18 Thread Jim S
regular text within a separate shell script. > lucas > > On Thursday, August 18, 2022 at 8:53:38 AM UTC-4 Jim S wrote: > >> It should be the same as auth.settings.hmac_key, probably set in db.py >> >> auth.settings.hmac_key = ( >> "sha512:whatever-your-has-

[web2py] Re: pbkdf2(1000,20,sha512)$etc... in v2.22.5

2022-08-18 Thread Jim S
Here is what I'm using: password = str(CRYPT(key= "pbkdf2(1000,20,sha512):whatever-your-hash-string-is")(unhashed)[0]) On Wednesday, August 17, 2022 at 9:01:32 PM UTC-5 lucas wrote: > hello one and all, > in linux/bash script code, not web2py interface, how do i take a regular > string and conv

[web2py] Re: Send code to sms # for 2 factor auth

2022-07-19 Thread Jim S
For those who care, this was super-simple to implement once I took the time to read the manual. I implemented using RingCentral as a transport to send sms messages. -Jim On Tuesday, July 19, 2022 at 3:51:55 PM UTC-5 Jim S wrote: > Read the docs Jim... > > > > http://web2py.co

[web2py] Re: Send code to sms # for 2 factor auth

2022-07-19 Thread Jim S
Read the docs Jim... http://web2py.com/books/default/chapter/29/09/access-control#Two-step-verification On Tuesday, July 19, 2022 at 3:18:33 PM UTC-5 Jim S wrote: > Hi > > I'm looking to modify my web2py login to do a poor man's 2 factor auth. > > I would like my l

[web2py] Send code to sms # for 2 factor auth

2022-07-19 Thread Jim S
Hi I'm looking to modify my web2py login to do a poor man's 2 factor auth. I would like my login to proceed like this: 1. present login page 2. user fills out username/password and submits 3. if username/password match proceed to step 4 - if not, re-display login page 4. send sms message with

[web2py] Re: sessions folder under application

2022-07-06 Thread Jim S
I believe that you can. However, this will invalidate all active sessions and all active users will have to log in again. Are there date stamps you can use to delete old session files but keep current ones? -Jim On Tuesday, July 5, 2022 at 10:44:35 PM UTC-5 Vlad wrote: > I was checking memor

[web2py] Re: customizing field's visibility in user's profile

2022-06-08 Thread Jim S
Can you just set readable and writable to False? -Jim On Tuesday, June 7, 2022 at 3:32:54 PM UTC-5 Vlad wrote: > I added a few fields to auth_user, but they are for internal usage, so I > don't want users to see those when they are logged in. How do I manage the > visibility of the fields in

[web2py] Re: starred expression with tuple or array !? differente behaviour!

2022-04-18 Thread Jim S
Did you see my reply in the py4web group? -- If I'm understanding the question correctly, I think I'd do the following: cell_list = [] cell_list.append(TD("...first td here...")) cell_list.append(TD("...additional cell...")) cell_list.append(TD("...additional cell..."))

[web2py] Re: py4web chat Saturday April 16

2022-04-18 Thread Jim S
The entire chat from Saturday can be found on our discord link (above) in the General channel. Anyone thinking about migrating applications? What do you see as barriers to moving to py4web? -Jim On Friday, April 15, 2022 at 8:04:27 AM UTC-5 Jim S wrote: > For anyone interested in learn

[web2py] py4web chat Saturday April 16

2022-04-15 Thread Jim S
For anyone interested in learning more about py4web... >From Massimo - Hello everybody, We are planning a py4web Q&A on Saturday April 16 at 10am Pacific time. On our discord channel. Hope to see you there. Massimo py4web discord link -> https://discord.gg/WQc2skNG -- Resources: - http:/

[web2py] Re: calculating sums of a table field when the values are inherited from another table

2022-04-11 Thread Jim S
How about this? *{{total = 0}}* *{{for c in children:}}{{=c.parent.full_names}} {{=c.childs_names}}{{=c.policy_cover.policy_name}} {{=c.policy_cover.premium}}{{total +=c.policy_cover.premium}}{{pass}}* ** ** *TOTAL PREMIUM: {{=total}}* ** ** On Monday

[web2py] Re: Creating a sums value from a column on an SQLFORM.grid

2022-04-08 Thread Jim S
with my code? or What am i missing?? > > > > > *def payments():payments_sum_field = > db.payments.amount.sum().with_alias('total') > grid_table=SQLFORM.grid(db.payments, fields=[db.payments.client, > db.payments.amount, db.payments.recorded,db.payments.recorded_on,

[web2py] Re: Creating a sums value from a column on an SQLFORM.grid

2022-04-07 Thread Jim S
It looks like there is support for groupby in SQLFORM.grid which is what you'd need to build the proper SQL statement. I haven't tried this with web2py. If I were, I'd try adding a groupby clause and a list of fields that include your sum field. Something like this (not tested) payments_sum_

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

2022-03-31 Thread Jim S
; > Perhaps we should try with a newer version of python again with sudo pip > install. Though if it were a compatibility problem I don't see why it > should work without wsgi. > On Thursday, March 31, 2022 at 4:20:45 PM UTC+2 Jim S wrote: > >> You don't have different

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

2022-03-31 Thread Jim S
7;re going to move to a newer version. In fact we started on a newer > version but ran into this problem. We're now on 3.6 because we were > checking if the problem would persist since 3.6 was the default python3 on > the machine. > > It's interesting that this is an issue

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

2022-03-31 Thread Jim S
When I've run into similar situations on Ubuntu the resolution was to install the package using sudo. If you just pip installed the package under your user then I believe it is stored in .local/lib/python3.x/site-packages in the user home directory. This would explain why it works when you run

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

2022-03-29 Thread Jim S
Does the user that is running the web2py server have rights to create the directory and files inside that directory? -Jim On Tuesday, March 29, 2022 at 9:51:42 PM UTC-5 mostwanted wrote: > Yes it is > > On Tuesday, March 29, 2022 at 9:41:43 PM UTC+2 Jim S wrote: > >> I thin

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

2022-03-29 Thread Jim S
exist, i thought the folder gets created with the first database entry > > On Tuesday, March 29, 2022 at 2:00:18 PM UTC+2 Jim S wrote: > >> I would first suspect a security issue. >> >> Have you confirmed that the folder exists? If so, does the file exist? >> >&g

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

2022-03-29 Thread Jim S
I would first suspect a security issue. Have you confirmed that the folder exists? If so, does the file exist? -Jim On Tuesday, March 29, 2022 at 1:07:26 AM UTC-5 mostwanted wrote: > I tried to change this line: > *Field('fileS','upload',uploadfolder=request.folder+'static/pdfs'))* > to this b

Re: [web2py] Re: LOAD in py4web

2022-02-16 Thread Jim S
See this thread for how to replicate LOAD in py4web - https://groups.google.com/u/1/g/py4web/c/EUpv9IRJ_eo/m/niHzrnR5AwAJ In short, use load_and_trap from utils.js. I was using this for a while but then transitioned to doing all my reactive-type functions using htmx. https://htmx.org Check ou

[web2py] Re: DataTable() not a function

2021-12-21 Thread Jim S
I wish I could help, but I'm not javascript guru. That's why I've moved to py4web, grid and htmx. Do you have the datatables .css and .js files loaded? jquery.dataTables.min.js is not all that you need. cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css cdn.datatables.net/1.11.3/js/jquer

[web2py] Re: How to escape double curly brackets in views

2021-12-16 Thread Jim S
You can change the web2py delimiters as mentioned here -> http://web2py.com/books/default/chapter/29/05/the-views#The-views in db.py add: response.delimiters = ("[[", "]]") to use [[ and ]] On Thursday, December 16, 2021 at 2:10:13 AM UTC-6 vincent...@gmail.com wrote: > Hello, > > I have a v

[web2py] Re: Error ticket for "admin" when trying to create a view

2021-12-16 Thread Jim S
Looks like you're passing some data through the request vars and the value is Null. Would need to see more code to be able to help. -Jim On Wednesday, December 15, 2021 at 12:09:08 AM UTC-6 mostwanted wrote: > Hi guys, I'm updating one of my very early projects, I was trying to > create a vie

[web2py] Re: IS_NOT_IN_DB( ) exception error

2021-12-09 Thread Jim S
Can you try this instead? db.client.policy_N.requires=IS_NOT_IN_DB(db, 'client.id'*)* -Jim On Wednesday, December 8, 2021 at 11:37:25 PM UTC-6 mostwanted wrote: > I'm trying to use the validator IS_NOT_IN_DB( ) but i keep getting the > error below, what does it mean? > > * Validation error, fie

[web2py] Re: Calculations on values extracted from several database tables not displaying some values

2021-12-01 Thread Jim S
e, I get errors > that: * name 'orders' is not defined *and > * 'exceptions.NameError'> name 'add_r' is not defined* > > On Tuesday, November 30, 2021 at 5:23:02 PM UTC+2 Jim S wrote: > >> It looks to me like your nesting in your template is

[web2py] Re: Calculations on values extracted from several database tables not displaying some values

2021-11-30 Thread Jim S
It looks to me like your nesting in your template is wrong. Seems that your {{pass}} statements are not where they should be. Based on how I'm reading it, you'll only get a total if there are orders for room service. You'll only get room service amounts if there are extra room bookings. I'd

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

2021-11-15 Thread Jim S
I'd do that with a custom form (SQLFORM.factory). http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-factory -Jim On Sunday, November 14, 2021 at 5:29:14 AM UTC-6 spamf...@gmail.com wrote: > I have a table with two boolean fields. All four combinations used to be > mea

[web2py] Re: Displaying database information without repeating details

2021-10-28 Thread Jim S
k, > its the Quantity in the *Products *table, different from the sold > quantity in the *sales *table (*sales.quantity*) > > On Thursday, October 28, 2021 at 4:22:15 PM UTC+2 Jim S wrote: > >> Ok, here is what I would do in my template: >> >> >> {{las

[web2py] Re: Displaying database information without repeating details

2021-10-28 Thread Jim S
ame.append(sales.product.name)}} > {{else:}} > > {{pass}} > {{pass}} > > > > On Thursday, October 28, 2021 at 2:01:34 PM UTC+2 Jim S wrote: > >> In the solu

[web2py] Re: Displaying database information without repeating details

2021-10-28 Thread Jim S
) but now I > have a problem calculating the sum of each item's sold quantities. > > On Wednesday, October 27, 2021 at 8:27:50 PM UTC+2 Jim S wrote: > >> I have done this before, but not using SQLFORM.grid >> >> In a nutshell >> >> 1. Create table tag &g

[web2py] Re: Displaying database information without repeating details

2021-10-27 Thread Jim S
I have done this before, but not using SQLFORM.grid In a nutshell 1. Create table tag 2. create your table header 3. create a temp variable last_item_name and set to None 4. loop through all the data you're going to display 5. in the item_name column, check if the current item name is equal to l

[web2py] Re: want to lookup a phone number in a db

2021-10-19 Thread Jim S
I don't think this is a good solution because it is retrieving all the rows from the database and then iterating over them to find a match. Do you have the option of sanitizing a phone number before it is stored in the database? Or, could you create a new 'sanitized' phone number field that yo

[web2py] Re: Guidelines for choosing web2py or py4web

2021-10-05 Thread Jim S
I am biased, but do yourself a favor and write it with py4web. The execution isn't just a little bit faster, it is orders of magnitude faster. Check out the SouthBreeze sample app I wrote using py4web, bulma and htmx. https://southbreeze.pythonbench.com Documentation for web2py is better, but

[web2py] Re: Web2py Scheduler, db query is not executing.

2021-10-05 Thread Jim S
Have you tried adding a db.commit() to your delete_after_hours() function? -Jim On Tuesday, October 5, 2021 at 8:49:44 AM UTC-5 Andrew wrote: > Hello, I am trying to run a database query using the web2py scheduler, but > for some reason I can't get the query to commit. I've tested the functio

[web2py] Re: sqlhtml changes for sqlform.factory, not nice, 2.15.4 versus 2.18.5

2021-10-02 Thread Jim S
Have you tried with the latest web2py? I'm assuming the behavior is the same as with 2.18.5. Have you been able to pinpoint a commit that would have changed this behavior? -Jim On Thursday, September 30, 2021 at 4:04:28 AM UTC-5 Awe wrote: > Is anybody out there facing the same problem, wond

[web2py] Re: A friend has developed a flask application and now wants to add a login and security. I would like to know if it would be feasible to convert the flask application to web2py.

2021-09-27 Thread Jim S
I agree that py4web would give much better performance. Do you know anything else about the application? Does it use SQLAlchemy? If the codebase isn't that large, converting to web2py and py4web wouldn't be terrible. While I'd do it in py4web, auth in Flask isn't that hard. I'd recommend the

[web2py] Re: Built-in helpers on session.flash

2021-07-23 Thread Jim S
Have you tried wrapping the XML function around it? session.flash = XML(CENT.) On Friday, July 23, 2021 at 9:35:26 AM UTC-5 jitun...@gmail.com wrote: > Hi, > > This piece of code worked in older version of web2py... > > session.flash = CENTER(DIV(H4('sFTP Error: ' + ftp_error_parse(e)), >

Re: [web2py] python developer survey

2021-03-05 Thread Jim S
py4web over the coming year. -Jim On Friday, March 5, 2021 at 4:13:45 PM UTC-6 Ramos wrote: > No responses from Portugal? Fake report :) > Pydal should be there also :) > > > Em qui., 4 de mar. de 2021 às 17:59, Jim S escreveu: > >> I just saw this today. web2

[web2py] python developer survey

2021-03-04 Thread Jim S
I just saw this today. web2py is #5 in web frameworks. https://www.jetbrains.com/lp/python-developers-survey-2020/ -- 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 Is

Re: [web2py] Re: auth.signature not working

2021-02-15 Thread Jim S
.entities._after_update.append(lambda s, f >> : wfFields().update_authors(db, 'entities', s, f)) >> db.entities._after_update.append(lambda s, f: extrafields_sync(s, f)) >> db.entities._after_insert.append(lambda f, id: extrafields_sync(db( >> db.entities.id==id), f)) &g

[web2py] Re: auth.signature not working

2021-02-15 Thread Jim S
Have you tried with an auth decorator? Maybe auth.requires_login()? -Jim On Saturday, February 13, 2021 at 3:33:01 PM UTC-6 Ramos wrote: > Anybody here? > > Em sex., 12 de fev. de 2021 às 23:57, António Ramos > escreveu: > >> hello this is my model >> db.define_table( >> 'entities', >>

[web2py] Re: Got error when I put 'fields' as an argument to SQLFORM.grid

2021-01-26 Thread Jim S
Can you try with the field in the format: db.tablename.fieldname ex: fields = [db.engagement.id, db.engagement.name] -Jim On Monday, January 25, 2021 at 11:45:49 PM UTC-6 at wrote: > Here is the code: > `fields=['id', 'name']` > `grid = SQLFORM.grid(db.engagement, fields=fields)` > > Error:

[web2py] Re: Pass/Receive args contains "&" in the value

2021-01-18 Thread Jim S
Can you wrap it in an XML function? View On Wednesday, January 13, 2021 at 4:03:54 PM UTC-6 Omi Chiba wrote: > In another word, how I can encode and decode the value including special > characters such as "&". > > https://help.marklogic.com/Knowledgebase/Article/View/using-url-encoding-to-hand

[web2py] Re: github discussion feature

2021-01-07 Thread Jim S
I'd be interested in at least exploring it as an option. I'm not happy with the new google groups at all. -Jim On Thursday, January 7, 2021 at 5:09:50 PM UTC-6 黄祥 wrote: > *problem with google group* > sometime the post is deleted automatically after posted > > *alternative* > perhaps can use

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

2020-12-08 Thread Jim S
ue and > fake_migrate=True at the same time? > Thanks, Jon. > > On Mon, Dec 7, 2020 at 8:47 PM Jim S wrote: > >> Can you try setting migrate=True, fake_migrate=True and >> fake_migrate_all=True in the new repo? >> >> either that, or copy the databases dir

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

2020-12-07 Thread Jim S
Can you try setting migrate=True, fake_migrate=True and fake_migrate_all=True in the new repo? either that, or copy the databases directory over from old repo to the new repo. -Jim On Monday, December 7, 2020 at 9:10:06 AM UTC-6 Jonsubs wrote: > Oh, I forgot to comment (and I believe it may b

[web2py] Re: How to add another field to select clause?

2020-11-28 Thread Jim S
Glad to hear you got it working. -Jim On Saturday, November 28, 2020 at 11:44:41 AM UTC-6 alexg...@gmail.com wrote: > It worked Jim. Thanks! > > On Friday, November 27, 2020 at 11:18:32 AM UTC-8 Jim S wrote: > >> If your groupby is a list of fields then it needs list brack

[web2py] Re: How to add another field to select clause?

2020-11-27 Thread Jim S
If your groupby is a list of fields then it needs list brackers [ ] around it. Can you add that and report back? -Jim On Friday, November 27, 2020 at 2:01:17 AM UTC-6 alexg...@gmail.com wrote: > using Postgres > > On Thursday, November 26, 2020 at 11:18:00 PM UTC-8 Alex Glaros wrote: > >> How

[web2py] Re: Error: Connection lost during download

2020-11-10 Thread Jim S
That depends on your software stack. Where is this hosted? What web server? Are you using uwsgi? I have experience with nginx and uwsgi but not much else. -Jim On Tuesday, November 10, 2020 at 3:10:28 PM UTC-6, SR wrote: > > How do I fix this? Any suggestion would be appreciated. > > On T

[web2py] Re: InFailedSqlTransaction

2020-11-10 Thread Jim S
ad a > website page. > > I've resolved this problem moving the scheduler tables in another DB. > > Thanks for your help. > Il giorno martedì 10 novembre 2020 alle 15:45:43 UTC+1 Jim S ha scritto: > >> Did you go in to the application so that db.py would be executed, there

[web2py] Re: InFailedSqlTransaction

2020-11-10 Thread Jim S
eduler... > > Il giorno martedì 10 novembre 2020 alle 15:20:36 UTC+1 Jim S ha scritto: > >> Can you go to the databases directory in your app and delete the >> scheduler tables from there? Then make sure your db connection has >> migrate=True specified along with fak

[web2py] Re: InFailedSqlTransaction

2020-11-10 Thread Jim S
Can you go to the databases directory in your app and delete the scheduler tables from there? Then make sure your db connection has migrate=True specified along with fake-migrate=False. I'm thinking that should force a rebuild of the scheduler tables in your database. -Jim On Tuesday, Novemb

[web2py] Re: web2py ajax function in py4web

2020-11-09 Thread Jim S
Stifan Can you post this in the py4web group? In py4web we don't include any jquery components. The goal is to be as light as possible and require as few additional packages as possible. I think you'll get better visibility on the py4web list to get this question answered. I know there are

Re: [web2py] Re: Displaying content based on the id attribute

2020-11-07 Thread Jim S
t; Yah there is more ot it, is there something specific you were looking for? > Some javascript functions I have saved seperately like the one being called > by the function in the controller > *( _onclick="updatelivesearch(jQuery('#res%s').html())" % c.service_name )

Re: [web2py] Re: Displaying content based on the id attribute

2020-11-07 Thread Jim S
s">loading ... href="/init/default/companies/107" id="resepac" > onclick="updatesearch(jQuery('#resepac').html())" style="font-weight: > bold;">Electrical Parts & Components class="product" href="/init/default/

Re: [web2py] Re: Displaying content based on the id attribute

2020-11-07 Thread Jim S
se are the links that when clicked I need to > display the hidden div next to them to show that the page is loading > On Saturday, November 7, 2020 at 7:49:47 PM UTC+2 Jim S wrote: > >> The page that was generated >> >> -Jim >> >> On Saturday, November 7, 2020

Re: [web2py] Re: Displaying content based on the id attribute

2020-11-07 Thread Jim S
The page that was generated -Jim On Saturday, November 7, 2020 at 11:48:37 AM UTC-6, mostwanted wrote: > > What do you mean the final html Jim? Do you mean the actual code or the > page generated? > > On Saturday, November 7, 2020 at 7:08:36 PM UTC+2 Jim S wrote: > >>

Re: [web2py] Re: Displaying content based on the id attribute

2020-11-07 Thread Jim S
ng, these > links are not responsive & I dont know why! > > On Thursday, November 5, 2020 at 4:33:32 AM UTC+2 Jim S wrote: > >> Can you remove the _onclick from that element and add that function call >> to the end of your listener defined in document ready? >

[web2py] Re: Displaying content based on the id attribute

2020-11-04 Thread Jim S
able > > **$(document).ready(function(){ > $('.service').click(function(e) { > *console.log( "Hello world!" );* > const id = $(this).data('id'); > $('#' + id).fadeIn(); > e.preventDefault(); > >

[web2py] Re: Displaying content based on the id attribute

2020-11-04 Thread Jim S
> > I threw in console.log("Hello world!"); but its not printing anything on > the console! The link events are not being handled! > > > On Tuesday, November 3, 2020 at 11:35:19 PM UTC+2 Jim S wrote: > >> Can you put some console.log() statements in your java

[web2py] Re: Displaying content based on the id attribute

2020-11-03 Thread Jim S
Can you put some console.log() statements in your javascript inside your function to see what is/isn't working? -Jim On Tuesday, November 3, 2020 at 12:10:06 PM UTC-6, mostwanted wrote: > > Hey Jim, I have but it shows no errors! > > On Tuesday, November 3, 2020 at 6:02:50 PM

[web2py] Re: Displaying content based on the id attribute

2020-11-03 Thread Jim S
Have you checked your browser console to see if you have any javascript errors? -Jim On Tuesday, November 3, 2020 at 3:36:22 AM UTC-6, mostwanted wrote: > > I have a hidden span that i want displayed when a link is clisked while > waiting for the page to load but this is not working! I dont kno

[web2py] Re: scheduler error no such column: scheduler_task.broadcast

2020-10-18 Thread Jim S
Can you manually add the broadcast field to your scheduler_task table in the database? -Jim On Saturday, October 17, 2020 at 6:54:53 PM UTC-5, Ramos wrote: > > Hello i moved my app to opalstack from webfaction. > I have a sqlite db. I deleted all files inside databases folder with > .table ext

[web2py] Re: Object type None error

2020-10-17 Thread Jim S
Ok, I'm at a loss for what the problem could be. To further troubleshoot I'd probably open a web2py shell for your app and try different things with a good amcid and with 1910. python web2py.py -S application_name (http://web2py.com/books/default/chapter/29/04/the-core#Command-line-options

[web2py] Re: Object type None error

2020-10-16 Thread Jim S
What is the value of rowsconlab immediately following the executesql statement for id 1910 and for one that works? -Jim On Friday, October 16, 2020 at 7:03:49 AM UTC-5, T.R.Rajkumar wrote: > > > > >>- >> >> >> >> >> >> >> >>I get this error for a particular a

[web2py] Re: Object type None error

2020-10-15 Thread Jim S
Instead of rowsconlab = db.executesql("exec usr_getconlabqty_amc_new @amcid=?",placeholders=([amcid]),as_dict=True) can you try: rowsconlab = db.executesql("exec usr_getconlabqty_amc_new @amcid=?",placeholders=[amcid],as_dict=True) I removed the parentheses around [amcid] -Jim On Thursday,

[web2py] Re: Limiting database entries

2020-10-14 Thread Jim S
I'm not entirely clear on what you're asking for. Are you trying to limit the number of records in a table in the database? If so, then I'd probably create a trigger on the database. The way to do that would be dependent on which database you are using. If not, can you explain a little more?

[web2py] Re: Object type None error

2020-10-14 Thread Jim S
Can you share the relevant code? -Jim On Wednesday, October 14, 2020 at 12:29:54 AM UTC-5, T.R.Rajkumar wrote: > > this is the result of the sp for amcid = 1910 > > unitidamcnothsktsktssktuskawgdavda > pfamtsacamtesiamt > ts2AHO20DP0529921.3660

Re: [web2py] Re: Db fields in the "links" of the grid

2020-10-08 Thread Jim S
who has encountered it for the past 10 years, we can live with > it :) > > Thank you! > > > On Thu, Oct 8, 2020, 10:58 AM Jim S > > wrote: > >> Vlad >> >> The behavior is exactly as you said it is. >> >> I don't know if I&#

Re: [web2py] Re: Db fields in the "links" of the grid

2020-10-08 Thread Jim S
7;, >>Field('description','string',default='My Cart (%s)' % >> str((datetime.now().strftime("%m/%d/%Y %I:%M%p", >>auth.signature) >> >> db.define_table('cart_ownership', >> Field('description'

Re: [web2py] Re: Db fields in the "links" of the grid

2020-10-08 Thread Jim S
nding why you need the >>> try/except" - this is exactly the trouble I'm having too :) >>> >>> I do use the left join. So I should simply specify the table name - >>> correct? >>> >>> Well, if I do - then the grid itself works fin

Re: [web2py] Re: Db fields in the "links" of the grid

2020-10-07 Thread Jim S
;>>> _target='blank') >>>> >>>> return result >>> >>> >>> It does solve the problem, because try/except takes care of it, setting >>> up the id based on the context. >>> >>>

[web2py] Re: Db fields in the "links" of the grid

2020-10-07 Thread Jim S
I have a couple of ideas, but none are tested First, can you try adding the field_id parameter to your SQLFORM.grid() call? I believe that tells this grid which is your 'primary' table. Secondly (this is the way I typically handle it) - instead of coding everything in a lambda, call a function

[web2py] Re: Setting a default value for a reference field

2020-09-18 Thread Jim S
Reading from this stackoverflow post, it appears it isn't something you can do. But, they show some alternatives: https://stackoverflow.com/questions/5805059/how-do-i-make-a-placeholder-for-a-select-box However, that post is pretty old, maybe someone else has some better solutions. -Jim On

[web2py] Re: SQL db select multiple inner and an left outer joins

2020-09-11 Thread Jim S
You're welcome, glad to help On Friday, September 11, 2020 at 11:47:14 AM UTC-5, lucas wrote: > > ok, and since lists are by order, they'll be processed in that order from > index 0 on up. ok. thank you Jim S. > > On Friday, September 11, 2020 at 12:26:31 PM UTC-4 J

[web2py] Re: SQL db select multiple inner and an left outer joins

2020-09-11 Thread Jim S
10:48:16 AM UTC-5, lucas wrote: > > hey Jim S, and others, > > i've restructed the sql statement to: > > select c.title, c.subtitle, cg.id, cg.name, u.last_name, u.first_name, > u.id, u.email, l.id, l.date_generated, l.date_completed, > length(l.lab_data) > fr

[web2py] Re: SQL db select multiple inner and an left outer joins

2020-09-11 Thread Jim S
This may make me sound like a horrible developer, but I never use INNER joins. And when I say never, I mean NEVER. I have nothing against them, it's just that I can accomplish everything I want to do with LEFT joins. In your example for joining table class_groups I'd do something like this i

Re: [web2py] Re: is there a guide / discussion / hints for migrating apps to python3?

2020-09-09 Thread Jim S
We had a discussion about it earlier this year https://groups.google.com/forum/#!searchin/web2py/python3$20nginx%7Csort:date/web2py/BFvo2tn9IAI/nQMgO7HRBAAJ On Wednesday, September 9, 2020 at 9:57:50 AM UTC-5, tuan.ngo wrote: > > I found some link concern with install py3 with Nginx & uwsgi.

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

2020-09-01 Thread Jim S
time or for further details please contact us at the given > details.\n\nBest regards;' % (dt.Name, dt.Surname, now_dt2)) > db(db.house_owner.controller).update(controller=new_con)* > > *Regards; * > > On Tuesday, September 1, 2020 at 4:02:42 PM UTC+2

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

2020-09-01 Thread Jim S
The web2py scheduler pretty much is a background task that runs unnoticed. I use it in a number of places to queue hundreds or thousands of outbound emails. I like the scheduler because it then also servers as a log of the emails that were sent. If that isn't what you're looking for then how

  1   2   3   4   5   6   7   8   >