Re: [web2py] Re: Web2py with python 3.8.5

2021-01-14 Thread Joe Barnhart
Just for the record, because it's not clear from this thread, the Python 3,8 problem seems to have been taken care of. I've been running web2py on Python 3.8 for the last couple of weeks at least and never noticed a problem. On Sunday, January 3, 2021 at 2:26:52 PM UTC-6 jimka...@yahoo.com wr

[web2py] Re: Happy New Year

2021-01-01 Thread Joe Barnhart
And whatever "lucky food" you ate LAST year on New Year's -- DON'T TOUCH THAT STUFF!! It didn't work. -- Joe On Thursday, December 31, 2020 at 4:33:09 PM UTC-6 snide...@gmail.com wrote: > On Thursday, December 31, 2020 at 11:37:24 AM UTC-8 Massimo Di Pierro > wrote: > >> >> I wish you all a h

[web2py] Re: Redis and Python3?

2021-01-01 Thread Joe Barnhart
else:* * rtn = None* Does anyone know how to make code blocks in this new stupid Google Groups window? Sheesh. One step sideways and three steps back. -- Joe On Wednesday, September 11, 2019 at 12:11:13 AM UTC-5 Massimo Di Pierro wrote: > :-) > > > On Mo

[web2py] Re: Is it time to take redis off the features list?

2021-01-01 Thread Joe Barnhart
Jose C wrote: > I have it working with python3 but only as far as web2py 2.18.5. > Thereafter I cannot get it to work either. > > Unfortunately it does begin to appear that web2py has reached end of life > status. > > On Friday, 13 November 2020 at 03:13:18 UTC Joe Barn

[web2py] Is it time to take redis off the features list?

2020-11-12 Thread Joe Barnhart
I know this is really old news, but redis no longer works under python 3 and web2py. I'm just thinking it's time to take out all mention of redis from the book and list of features of web2py. Yes, it technically works with python 2, but since that platform is now dropped in the wake of the go

[web2py] Using LOAD and template blocks

2020-10-31 Thread Joe Barnhart
I'm using LOAD functionality to break my webpage into bite-sized "cards" or "widgets" each of which is loaded separately when the page is called. My overall website looks much like a "dashboard" with several of these widgets on a single page. I'm trying to understand the LOAD process and how I

[web2py] Re: pyDAL looks abandoned?

2020-08-12 Thread Joe Barnhart
FWIW there's nothing stopping you from using peewee inside web2py instead of DAL, if you desire. It's kind of an advanced topic, but it's possible. I notice peewee relies on cascaded message sends. Being an old Smalltalker I actually like cascaded message sends, but I recall that pypy really

[web2py] Re: Tip - Using multiple web2py templates

2020-08-12 Thread Joe Barnhart
Doesn't this have an unfortunate negative effect on "compiled" views? To be compiled, everything about the view needs to be known ahead of time and your dynamic use of templates seems to defeat that. I suspect when you choose to "compile" the application from the web2py admin interface, these

[web2py] Re: Auth - overlapping permissions problem

2020-07-26 Thread Joe Barnhart
Having more than one group with the same permissions is no problem at all. In fact, it's kind of the purpose of role-based authentication. I have a web site that features different classes of users who need access to pages. Some groups can access every single page in the site (e.g. 'root' use

[web2py] Re: 2.19.1 redis sessions problem

2020-06-10 Thread Joe Barnhart
Yep. I just confirmed the errant behavior with web2py 2.20.4 and python 3.8.2. If reds sessions are enabled the logon never completes. -- Joe B. On Sunday, March 29, 2020 at 11:39:10 PM UTC-5, Massimo Di Pierro wrote: > > Sorry. We should fix this. Will look into it asap. > > On Sunday, 29 Mar

[web2py] Re: Redis and Python3?

2019-09-09 Thread Joe Barnhart
PM UTC-7, Massimo Di Pierro wrote: > > py4web supports redis. Just saying. ;-) > > On Monday, 9 September 2019 09:27:20 UTC-7, Joe Barnhart wrote: >> >> I sure wish somebody could fix this. It's a real bottleneck to Python3 >> adoption for my site. I tried usi

Re: [web2py] Re: Redis and Python3?

2019-09-09 Thread Joe Barnhart
o create a test bench for this. If someone else has a Python2/redis site already they may be able to test it quicker. -- Joe On Monday, September 9, 2019 at 3:00:50 PM UTC-7, Jim S wrote: > > Is it backward compatible as well? > > -Jim > > On Mon, Sep 9, 2019 at 4:54 PM Joe

[web2py] Re: Redis and Python3?

2019-09-09 Thread Joe Barnhart
my own applications) to work in a > multinode environment accessing a distributed redis server for session > caching. > Let us know if it solves your problem. > Regards > Stephane > > > Le lundi 9 septembre 2019 18:27:20 UTC+2, Joe Barnhart a écrit : >> >> I sur

[web2py] Re: Redis and Python3?

2019-09-09 Thread Joe Barnhart
s%7Csort:date/web2py/PdquGF_9a2E/6VJpLqsnBgAJ >> >> At that time I just continued using python redis 2.10.6. But, can't do >> that forever. Anyone able to test or improve upon the change I made >> above? Like I said, it works for me, but I don't know h

[web2py] Re: Redis and Python3?

2019-03-31 Thread Joe Barnhart
um/?pli=1#!searchin/web2py/redis%7Csort:date/web2py/PdquGF_9a2E/6VJpLqsnBgAJ > > At that time I just continued using python redis 2.10.6. But, can't do > that forever. Anyone able to test or improve upon the change I made > above? Like I said, it works for me, but I don't kn

[web2py] Re: In praise of the lowly "nested_select"

2019-03-29 Thread Joe Barnhart
Sorry for the delay in replying. The first step is to create a Select object, rather than an Expression. Look again at the code: subq = db(dbts.id>0).nested_select(dbts.ALL,...etc) This creates a Select object. The Select object implements "on". (Table also implements "on", but not Expressio

[web2py] Re: In praise of the lowly "nested_select"

2019-03-29 Thread Joe Barnhart
Sorry I didn't see this question earlier. The "on" attribute is on the Table object. If you look at the code, I use variables like dbt = db.times This allows me to use "dbt.xxx" to access the Table object directly. I find it a convenient syntactic shorthand because I'm always using it to get

[web2py] Re: Redis and Python3?

2019-03-29 Thread Joe Barnhart
Hi Leonel -- My brain refuses to put together the words "session locked field". I understand the part of pickle smashing the values and encoding them as one string. The bool has something to do with session locking? I've only looked at the web2py redis code in the most scant way as I wasn't

Re: [web2py] Re: Not my type

2019-03-29 Thread Joe Barnhart
se worked for me. Kind of weird because when I checked which > version of python I had running it said 2.7 but perhaps I installed w2p > with python3. > > Anyway, at the end I was suggesting that maybe we could update the book > some making reference to how things might look with pyt

[web2py] Re: web3py again....

2019-03-28 Thread Joe Barnhart
I agree that back porting web2py code should be straightforward (after all, it's not rocket science :-D). But maybe we should revisit those modules and pare them down to minimalist proportions. I really need Auth, complete with user roles and groups, but there's probably a better way to minim

[web2py] Re: Not my type

2019-03-28 Thread Joe Barnhart
Hi Al -- First off, welcome to the web2py group. Next, it's not clear from your message just what the question is. If you can elaborate on (a) what you did, (b) what you expected, and (c) what you got, I'm sure someone here can help Warm regards, Joe B. On Thursday, March 28, 2019 at 2:10:

[web2py] Re: Redis and Python3?

2019-03-27 Thread Joe Barnhart
have > been allowed. Web3py will use json for sessions or move away from sessions > completely. > > Massimo > > On Tuesday, 19 March 2019 21:07:43 UTC-7, Joe Barnhart wrote: >> >> Has something changed in the operation of redis to store sessions in >> web2py wh

[web2py] Redis and Python3?

2019-03-19 Thread Joe Barnhart
Has something changed in the operation of redis to store sessions in web2py when we use python3 instead of python2? I'm hitting an error in the py-redis library that complains I can't store a boolean in redis (unsupported data type). Since this seems to be a well known design feature of redis

[web2py] Re: how can I get row representation set in 'format' table option

2018-10-23 Thread Joe Barnhart
Here's an example from my site: Field("sender", "reference auth_user", default=lambda: current.auth.user.id, represent=db.auth_user._format, requires=IS_NULL_OR(IS_IN_DB(db,'auth_user.id'))), As you can see, it can be accessed as the attribute

[web2py] Re: Limits of storing session in browser cookie?

2018-09-27 Thread Joe Barnhart
wser to replace the old one. Note, > quite incidentally, this bug does not affect Auth because the logout method > in Auth adds "flash" to the session after logout, which forces a new cookie > to be sent to the browser. > > Anthony > > On Thursday, September 27,

Re: [web2py] Setting writable and readable=True on all fields

2018-09-27 Thread Joe Barnhart
Yep. I'm pretty sure 'fields' is a list so it doesn't need function parentheses. And since "my_table" and "db['my_table']" are the same: for f in my_table.fields: my_table[f].writable=True Same thing, but sweetened with syntactic sugar. (low calorie) -- Joe On Thursday, September 27,

[web2py] Re: How to capture auth_user login time & logout time

2018-09-27 Thread Joe Barnhart
What Anthony said. Only sessions rarely log out. They mostly time out, which does not show up as an event. Joe On Wednesday, September 26, 2018 at 12:13:25 PM UTC-7, mostwanted wrote: > > Hi guys, i was wondering if there is a way for me to capture user login > time and user logout time > > R

[web2py] Limits of storing session in browser cookie?

2018-09-27 Thread Joe Barnhart
I love the new(?) capability of storing the session information in a browser cookie. Mainly because I'm lazy and don't want the responsibility of determining when to throw out sessions and manage them on my end. I added this to my app: session.connect(request, response, cookie_key="mylittlepo

[web2py] Re: How to add variable in function which called inside ajax function

2018-09-04 Thread Joe Barnhart
$.ajax({ data: {a:2, b:3}, url: "{{=URL('loadAdditonalInfo')}}", success: my_success_fcn(ret) )}; Something like this, from memory... You can get more details at the jQuery website. It has excellent docs. Joe On Tuesday, September 4, 2018 at 6:23:03 AM UTC-7, Константин Комков wrote: >

[web2py] Re: pydal metadata in db

2018-09-04 Thread Joe Barnhart
I'm worried about losing control over the db migration process. Using MySql it is fairly common for the migration process to go wrong, as MySql doesn't do will with adding and deleting multiple columns. I often need to drop a few tables, delete the corresponding file in 'databases' and then f

[web2py] Re: Hidden fields in SQLFORMs are one-way?

2018-08-27 Thread Joe Barnhart
r* line 2. > > So, you can add values from request.vars to form.vars before calling > .validate() or .process(), and the values will be available in any > onvalidation callback (of course, you can also refer directly to > request.vars anywhere). > > Anthony > > > On Mon

[web2py] Hidden fields in SQLFORMs are one-way?

2018-08-26 Thread Joe Barnhart
So I'm trying to use a hidden field to create some unique behavior in a form. I want to send out the field when the form is first created (using the hidden=dict(...) keyword on SQLFORM). But later, while processing the form through the error phase, I want to update that value to a different v

[web2py] Re: Need to add form "warnings" in addition to "errors"

2018-08-23 Thread Joe Barnhart
just the unfortunate collision of design choices to limit the usefulness of "elements" in this one corner case. The red flash isn't that bad. I'll just say I'm doing it deliberately to get the user's attention. "A feature is a bug as described by Marketi

[web2py] Re: Need to add form "warnings" in addition to "errors"

2018-08-22 Thread Joe Barnhart
enclosing DIVs to be class "warning" also. I'd provide different CSS for the yellow background. Just thinking out loud here. On Wednesday, August 22, 2018 at 3:31:14 PM UTC-7, Joe Barnhart wrote: > > I'm looking to add "warnings" to forms using (/hijackin

[web2py] Re: session data type changed after upgrade to 2.17.1

2018-08-22 Thread Joe Barnhart
So "session" stuff gets pickled and unpicked which makes sense that dates might come back as strings. What puzzles me is that it "used to work" so did pickled date objects used to come back as date objects again? That would seem like a much bigger change than just this example. -- Joe On Tue

[web2py] Need to add form "warnings" in addition to "errors"

2018-08-22 Thread Joe Barnhart
I'm looking to add "warnings" to forms using (/hijacking) as much of the existing form "errors" mechanism as possible. The idea is to provide a second level check that gives advice rather than drop-dead errors. I would like it to operate like this: 1. The form is submitted and checked for err

[web2py] Re: New web2py/pydal feautures for scalability

2018-08-07 Thread Joe Barnhart
It took me a minute to decipher this post! For the elucidation of others let me rephrase what I think you wrote... Some users may not like STORING (not "strong") data in the filesystem. Storing filesystem data is a bad idea when deploying the same website across multiple servers, i.e. it hind

[web2py] Re: How do you change memcache session expiry?

2018-08-07 Thread Joe Barnhart
Yes, I agree. This needs to be REMOVED FROM THE BOOK. I've just wasted most of a day before realizing memcache is useless for sessions. -- Joe On Friday, January 18, 2013 at 1:03:01 AM UTC-8, Paolo wrote: > > Hi all, I have just tried the solution proposed on the issue but it doen't > work.

[web2py] In praise of the lowly "nested_select"

2018-08-02 Thread Joe Barnhart
How did I not know about this gem earlier? I've been resorting to executesql() for my heavy joins-within-joins queries because, well, I thought I had to. The select join syntax doesn't do nested joins directly and I'd never heard of nested_select. Wow, what a great tool! I just make my sub-jo

[web2py] Re: Using cache.action in a module

2018-08-02 Thread Joe Barnhart
decorate >> any functions that take arguments (methods always take at least the self >> argument). >> >> On Wednesday, August 1, 2018 at 4:27:02 AM UTC-4, Joe Barnhart wrote: >>> >>> Ah, well. It seems a bit beyond me. I think it's failing because I'm &g

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Joe Barnhart
g.__name__ = f.__name__ return g return decorator On Wednesday, August 1, 2018 at 12:50:12 AM UTC-7, Joe Barnhart wrote: > > Oops, I meant of course; > > current.cache.action > > instead of > > current.cache > > > > > On Wednesday, Au

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Joe Barnhart
Oops, I meant of course; current.cache.action instead of current.cache On Wednesday, August 1, 2018 at 12:48:00 AM UTC-7, Joe Barnhart wrote: > > You're a fountain of ideas! I missed that one in the book. > > I wonder if this would work. Off to go try it... > > def

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Joe Barnhart
model, prefix, session, vars, lang, user_agent, public, valid_statuses, quick)(f)(*c, **d) g.__name__ = f.__name__ return g return decorator On Tuesday, July 31, 2018 at 11:25:10 AM UTC-7, Anthony wrote: > > On Tuesday, July 31, 2018 at 1:57:46 AM

[web2py] Using cache.action in a module

2018-07-30 Thread Joe Barnhart
I was wondering about this. I tried to search the group but didn't find anything relevant. Took a look at the source code and it seemed like I could use in a module which is called to produce a string of Javascript on demand of an Ajax routine. Beforehand, I save the global "cache" var in my

[web2py] Re: Why does cache.disk cause recursion error?

2018-07-30 Thread Joe Barnhart
Yes, of course you're right. The actual code is generated by this monstrosity: @staticmethod def make_toolbar(buttons, id, opt): #tb = CAT() tb = DIV(_id=id, _class=opt.w_toolbar_cls,_style="padding:0 0 0 5px;") for title, action, href_fcn, key in buttons: if isinstance(actio

[web2py] Unicode strings play havoc with JSON

2018-07-30 Thread Joe Barnhart
I'm sure this is a consequence of Py3 compatibility, but I"ve noticed several places where strings are now unicode and it plays havoc with JSON translation. I'm trying to convert the output of database queries into JSON and the resulting strings have the shape of: u'this is a unicode string'

[web2py] Why does cache.disk cause recursion error?

2018-07-29 Thread Joe Barnhart
I'm using cache.action with cache_model=cache.disk to play with optimization of my site. To be sure, this page has a lot going on -- complicated menus using "button" objects among the issues. But I don't have any circular references, at least as far as I can tell. Still, I get the error: Tr

[web2py] Postgres migration errors

2018-07-29 Thread Joe Barnhart
I’d get rid of the idiom: db.colname==“%s”%pythonvar Just replace it with: db.colname==pythonvar — Joe -- 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) ---

[web2py] Re: Using Scheduler without "dict" to define functions

2018-06-26 Thread Joe Barnhart
Thank you for pulling back some of the mystery surrounding the scheduler for me. The module import idea is fabulous and will completely solve my problem! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.go

[web2py] Using Scheduler without "dict" to define functions

2018-06-25 Thread Joe Barnhart
So I'm expanding my use of the scheduler -- one of the best features of web2py -- and I'm running into a "scaling" problem. I'm going to have perhaps a hundred little functions that the scheduler inserts into the queue. Now, if I define my little functions in the same Model page as the schedul

Re: [web2py] Re: Scheduler and far-away tasks

2018-06-11 Thread Joe Barnhart
on filter that automatically filters out >> any records with a future reveal date. >> >> Anthony >> >> >> On Sunday, June 10, 2018 at 7:20:19 PM UTC-4, Joe Barnhart wrote: >>> >>> Are there any reasons I should not schedule task

[web2py] Re: Scheduler and far-away tasks

2018-06-11 Thread Joe Barnhart
tes those items to become > visible. Or even just add a common filter that automatically filters out > any records with a future reveal date. > > Anthony > > On Sunday, June 10, 2018 at 7:20:19 PM UTC-4, Joe Barnhart wrote: >> >> Are there any reasons I should not

[web2py] Scheduler and far-away tasks

2018-06-10 Thread Joe Barnhart
Are there any reasons I should not schedule tasks days, weeks, or months in advance in the web2py scheduler? It seems such a fantastic, general-purpose tool that I'm using it for more and more things in the site. Currently I'm considering using it to "reveal" embargo'ed items that should no

[web2py] AppConfig in JSON returns unicode

2018-04-17 Thread Joe Barnhart
This is sort of a bug, sort of a feature. I just converted to the JSON version of AppConfig (in the gluon/contrib) and discovered the strings it produces are all unicode -- even in Python 2.x environments. I'm not sure of ALL of the ramifications, but I discovered it causes crypt fields to fai

[web2py] Re: Customizing Fields the lazy way

2018-04-15 Thread Joe Barnhart
;)), . . . It all works really well and gives me the single point of control I want. It requires no changes in web2py and works with current, past, and future versions. And the lazy programmer in me marvels at all the code I don't have to type. -- Joe On Thursday, March 23, 2017

[web2py] MySql deprecation of NO_AUTO_CREATE_USER

2018-04-15 Thread Joe Barnhart
Anybody else seeing this? .../gluon/contrib/pymysql/cursors.py:166: Warning: (3090, u"Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.") This Is showing up on the console while running version 2.16.1-stable+timestamp.2017.11.13.23.50.07 Just curio

[web2py] Re: Decrypt password from auth_user

2018-04-09 Thread Joe Barnhart
Actually you don’t want to show the correct number of characters. That gives an attacker a lot of information. -- 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

[web2py] Re: How to use HTML escapes in Field titles

2017-07-26 Thread Joe Barnhart
Thank you for your help, Anthony. -- Joe -- 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 Goog

[web2py] Re: How to use HTML escapes in Field titles

2017-07-26 Thread Joe Barnhart
("scm_gt",label=XML(T("SCM %s",(">",, elapsed_time_field("scm_le",label=XML(T("SCM %s",("≤",, elapsed_time_field("scy_gt",label=XML(T("SCY %s",(">",, elapsed_time_field("scy_le",label=X

[web2py] Re: How to use HTML escapes in Field titles

2017-07-26 Thread Joe Barnhart
e why &xx; is "sanitized" to begin with. It seems like an extreme form of sanitizing, to eliminate any and all special characters from form labels. -- Joe On Wednesday, July 26, 2017 at 5:16:55 PM UTC-7, Anthony wrote: > > On Wednesday, July 26, 2017 at 7:43:14 PM UTC-4, Joe

[web2py] Re: How to use HTML escapes in Field titles

2017-07-26 Thread Joe Barnhart
It's even worse than I imagined. Leaving off the T() operation, I find that my field labeled "LCM >" is actually sanitized at some point into: LCM >: Yes, something in the process has *recognized* the character ">" and changed it to ">" But the field "LCM ≤" was sanitized into: LCM ≤:

[web2py] Re: How to use HTML escapes in Field titles

2017-07-24 Thread Joe Barnhart
Ugh. Replace the word "title" with "label" everywhere. Global search and replace. -- 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 mes

[web2py] How to use HTML escapes in Field titles

2017-07-24 Thread Joe Barnhart
I have field titles which need to indicate "less than or equal" or "greater than" symbols. HTML provides such escapes with the character sequences ≤ and > respectively. But when I use these characters in the "title" of a Field, the displayed SQLFORM changes these back into "≤" for example ins

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-21 Thread Joe Barnhart
y 2017 21:34:40 UTC-5, Joe Barnhart wrote: >> >> Yes that fix looks exactly on point. >> >> -- Joe >> >> On Sunday, July 16, 2017 at 3:28:22 PM UTC-7, Leonel Câmara wrote: >>> >>> Joe the fix on the DAL wasn't for your problem, Your probl

[web2py] Re: Sacramento-area web2py programmers?

2017-07-17 Thread Joe Barnhart
Government interoperability? Isn't that an oxymoron? You mean, like use the same frequency radios and stuff? Sure, you can have me for dinner. Maybe we can scare up some others. I keep looking under rocks for more Python programmers up here. You'd think with all this 100+ weather that indo

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-16 Thread Joe Barnhart
Yes that fix looks exactly on point. -- Joe On Sunday, July 16, 2017 at 3:28:22 PM UTC-7, Leonel Câmara wrote: > > Joe the fix on the DAL wasn't for your problem, Your problem was fixed in > web2py here: > > https://github.com/web2py/web2py/pull/1686/commits/ce0b2557470ecb7c92719645293cb00785fe4

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-16 Thread Joe Barnhart
You are correct. By using the SQLFORM.factory function the table was, indeed, different. I blame the lapse on the inability of neurons to function in the 106 degree heat we're having in the Sacramento area today. -- Joe On Sunday, July 16, 2017 at 2:53:10 PM UTC-7, Anthony wrote: > > You ment

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-16 Thread Joe Barnhart
I think I tried your fix but it didn't work. None of my fields were "common". Massimo had pointed out the fix on Github. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Re

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-16 Thread Joe Barnhart
Found the issue and a workaround see below. -- 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 th

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-16 Thread Joe Barnhart
Yes... Massimo helped me come up with a workaround for my case. I am using SQLFORM.factory to create a form to edit two tables joined together. One table is used to index entries in a bunch of other tables by a 6-tuple. Since these are all swimming related, the tuple is (sex, upper_age, lower

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-15 Thread Joe Barnhart
Hmm... That's gonna be a problem. This is occurring in an SQLFORM... which is in a modal pop-up box... over a tabbed structure with about 5 more SQLFORMS... plus 5 or 6 jQuery DataTables... all powered by the same basic set of 4 or 5 tables. It will take a solid day to boil it down to a simpl

[web2py] Re: Web2py like clone in Java?

2017-07-15 Thread Joe Barnhart
As long as we're adding interesting but obscure and little-used web platforms, I'd like to submit Seaside, the Smalltalk web platform. Just... well... because Smalltalk! -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Grails for web2py - anyone interested ?

2017-07-15 Thread Joe Barnhart
But Grails borrowed heavily from Rails. And you, Massimo, mentioned that Rails also provided some "inspiration" for web2py So by the commutative property of web platforms, web2py and Grails share some family similarities. -- Joe On Thursday, July 13, 2017 at 10:05:54 AM UTC-7, Massimo Di P

[web2py] ValueError: Field is already bound to a table <-- need a fix for this

2017-07-15 Thread Joe Barnhart
I just switched to Version 2.15.1-stable+timestamp.2017.07.10.16.17.24 and I'm getting a new and very unwelcome error. ValueError: Field is already bound to a table Yeah. I knew that. In fact, the field is already bound to exactly the SAME table in other queries. So what? Why is that now

[web2py] Re: DAL sqlite vs postgresql: Row Orders are different?

2017-07-03 Thread Joe Barnhart
What he said. But in addition, consider the following: 1. The entire purpose of SQL is to treat data as unordered tables and let you establish a "relationship" between data in different tables, or within a single table. To add "order by" to every SQL select statement is a serious de-optimizat

[web2py] Re: cpython and web2py

2017-06-27 Thread Joe Barnhart
My experiments are all pretty old. Too old to be useful. Currently I have commercial websites using web2py and I don't need to do anything remarkable to make it faster. I just used good design techniques and didn't do "premature optimization." I'm now re-writing a Rails, site, a Java site, a

[web2py] Re: cpython and web2py

2017-06-25 Thread Joe Barnhart
It's hard to take these questions seriously when you haven't described your speed problem. How is your website performing, and what are the bottlenecks you've found? Yes, many people, including myself, have experimented with pypy and web2py. If you're observant, you'll notice there are many m

[web2py] Re: cpython and web2py

2017-06-17 Thread Joe Barnhart
No. On Sunday, May 28, 2017 at 8:50:15 AM UTC-7, Ron Chatterjee wrote: > > I understand that. No one is disputing better coding better performance. > But the question is: > > Cython wrapper ( > > Default. Py > > ) > Is it possible. If so how? > > -- Resources: - http://web2py.com - http://web

[web2py] Re: Error in handling long ints in gluon.serializers json()

2017-05-26 Thread Joe Barnhart
s the direct parent, it does not check up the "tree". And all of the helpers are subclasses of DIV, which itself is a subclass of XmlComponent. Just askin'... On Friday, May 26, 2017 at 12:05:25 PM UTC-7, Joe Barnhart wrote: > > I dunno how this affects me and not everyone else

[web2py] Error in handling long ints in gluon.serializers json()

2017-05-26 Thread Joe Barnhart
I dunno how this affects me and not everyone else who uses this tool. It looks like the default JSON serializer for web2py has a huge flaw. But if that were true, it would have been noticed by lots 'o people before. So it must be impure thinking on my part. My objects are being serialized wi

[web2py] Re: cpython and web2py

2017-05-18 Thread Joe Barnhart
"Make it faster" is a nice goal, but it has many different components, and just compiling everything with cython is not an easy way out. The path to take, like with any software project, is to implement the function that you need first. If, and only if, there is a performance problem, you care

[web2py] Re: Manual error regarding "hidden" fields

2017-05-10 Thread Joe Barnhart
"Invalidate".was supposed to be "onvalidation" before autospell worked its wonder... -- 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 me

[web2py] Re: Manual error regarding "hidden" fields

2017-05-10 Thread Joe Barnhart
It looks like just swapping the lines works. It's the simplest example of using hidden fields and it works even in my more complicated case. I was hoping to be "clever" and doing something in "invalidate" after the form was validated but before it was stored. But the logic in the "validate" a

[web2py] Re: Manual error regarding "hidden" fields

2017-05-09 Thread Joe Barnhart
who cut his teeth on cvs. -- Joe On Tuesday, May 9, 2017 at 7:35:08 AM UTC-7, Anthony wrote: > > Good point. Maybe submit a PR to the book repo. > > On Monday, May 8, 2017 at 5:07:01 PM UTC-4, Joe Barnhart wrote: >> >> In the section about SQLFORM, the description of h

[web2py] Re: Validate_and_insert fails because "id" has no value

2017-05-09 Thread Joe Barnhart
You are correct sir. The table has three "reference" fields and their default validators were the unforgiving type. Since this was a special case in which it was OK if the references were missing, I just nuked the validators before doing the "validate_and_insert" by setting the "requires=Non

[web2py] Validate_and_insert fails because "id" has no value

2017-05-08 Thread Joe Barnhart
So I'm using "validate_and_insert" to, well, validate and insert some values. Its a simple function and easily understood: def validate_and_insert(self, **fields): response, new_fields = self._validate_fields(fields) if not response.errors: response.id = self.inse

[web2py] Manual error regarding "hidden" fields

2017-05-08 Thread Joe Barnhart
In the section about SQLFORM, the description of hidden fields is demonstrably wrong. The code example is: form.vars.a = request.vars.a form = SQLFORM(..., hidden=dict(a='b')) Since the variable "form" is created on the second line, it is not available on the first as the target of an assignm

[web2py] Re: UPDATE BOOTSTRAP VERSION FROM 3 TO 4

2017-04-23 Thread Joe Barnhart
But are you sure that's the right approach? I force problems with lightweight clients (i.e. phones) doing complicated layout generation. -- Joe On Friday, April 21, 2017 at 8:19:15 AM UTC-7, Massimo Di Pierro wrote: > > Which is why I hate bootstrap and we have to move to client side > genera

[web2py] Re: Forms with readonly fields

2017-04-23 Thread Joe Barnhart
change is definitely essential for SELECT objects. Now, it could be limited to only SELECT objects, but there is no harm in broadening it to all widgets. Warm regards, Joe On Saturday, April 1, 2017 at 12:51:55 PM UTC-7, Anthony wrote: > > On Friday, March 31, 2017 at 5:41:49 PM UTC-4

Re: [web2py] Re: Making application looks better.

2017-04-19 Thread Joe Barnhart
Something's wrong! The text came out garbled on the screen shots. I can't read a thing! ;-) On Sunday, April 16, 2017 at 11:16:27 AM UTC-7, Ramos wrote: > > My humble doc management app still in testing, with workflows... > I have email templates looking very nice > > 2017-04-16 15:37 GM

[web2py] Re: "Show_if" and Field Validation

2017-04-10 Thread Joe Barnhart
a(value) if reterr is not None: break if reterr is not None: for ea in self.second: retval,reterr = ea(value) if reterr is not None: break return (retval, reterr) On Monday, April 10,

[web2py] Re: "Show_if" and Field Validation

2017-04-10 Thread Joe Barnhart
This is one of those head-scratchers Marcelo. Note the "onvalidation" function is called AFTER the validation is done on the form. By then it's too late to prevent the validators from being run on the hidden fields. I could monkey around with the added "error" stuff after the fact, but that's

[web2py] Re: "Show_if" and Field Validation

2017-04-10 Thread Joe Barnhart
Well, I'm not sure there's a nice general solution to this one. Since "show_if" is kind of an add-on to Field and isn't really a part of Expression or Validator or anything else. Here's what I came up with... First I created my set of "show_if" fields and set their validators to the existing

[web2py] "Show_if" and Field Validation

2017-04-06 Thread Joe Barnhart
I appreciate the new "show_if" attribute for Fields but I wonder if its action could be enhanced by one change... When I have a form with optional fields, I would like to set a validator on the field's value should it be supplied. I can always set it to IS_EMPTY_OR(blah) but this isn't strictl

[web2py] Re: Forms with readonly fields

2017-03-31 Thread Joe Barnhart
Anthony -- One more tiny but not insignificant detail... I found I had to add "requires=[]" to the custom.widget: [form.custom.widget[f.name].update(_readonly=True, requires=[]) for f in readonly_fields] Otherwise, the field keeps the 'requires' of the original Field and the check fails.

[web2py] Re: Forms with readonly fields

2017-03-31 Thread Joe Barnhart
urning, so when the > form is processed, those fields will not be included in the database write. > > Anthony > > On Friday, March 31, 2017 at 5:25:59 AM UTC-4, Joe Barnhart wrote: >> >> I'm going a little nuts with forms that have readonly fields. Examples >>

[web2py] Forms with readonly fields

2017-03-31 Thread Joe Barnhart
I'm going a little nuts with forms that have readonly fields. Examples are forms where some fields are shown to the user so they can see the contents, but they aren't allowed to change them. For example, an "expiration date" for a subscription. They can see when it expires, but they can't j

[web2py] Re: Customizing Fields the lazy way

2017-03-26 Thread Joe Barnhart
That's kinda clever. I may think of that! -- Joe On Thursday, March 23, 2017 at 4:19:05 PM UTC-7, Anthony wrote: > > Note, you might as well also add 'type': 'string' to your dictionary, and > maybe 'length': 20. You can also give yourself some flexibility by creating > a function: > > def ph

[web2py] Re: DAL executesql and escaping apostrophe/single quote

2017-03-23 Thread Joe Barnhart
I'm not sure what you're doing with a single-quote table name (?) but I observed your statements have different results after string substitution. In the first case, substituting the "Single' Quote" string results in: "SELECT * FROM table1 WHERE name = Single' Quote LIMIT 1" Whereas in your "re

Re: [web2py] lazy_tables + 'reference tablename' = referenced table not lazy

2017-03-23 Thread Joe Barnhart
Just a couple of philosophical comments... Whenever I find that the web2py platform is "forcing" me to code in large volumes and produce ugly, quirky code which I *know* will be hard to maintain, I stop myself and take another look at how I'm trying to accomplish my task. I have this philosoph

  1   2   3   4   5   6   >