[web2py] Re: How to retain the 'email verification' functionality in customized registration form?

2020-07-01 Thread Scott Hunter
Then you need to change something. Since you haven't shown *anything* of what you've written, no one can help with what that change might be. On Wednesday, July 1, 2020 at 1:00:06 AM UTC-4, Anusha Narayan wrote: > > when I am trying to style the registration form using HTML, I am losing > the f

[web2py] Re: Column auth_user.id not found BUT the column exists.

2020-06-27 Thread Scott Hunter
Can you post the complete instructions for the lines listed in the stack trace? At least for the one in your code? On Tuesday, June 23, 2020 at 10:10:32 AM UTC-4, Diego Tostes wrote: > > > I am getting this error: > > Traceback (most recent call last): > File "/home/rebec/web2py/gluon/restrict

[web2py] Re: CON Abandoned framework with (almost) no community

2020-05-18 Thread Scott Hunter
One constructive way to counter this "argument" might be to contribute a web2py entry (frontend and/or backend) to https://github.com/gothinkster/realworld On Sunday, May 17, 2020 at 5:10:31 PM UTC-4, Ramos wrote: > > How is that possible ? > https://www.slant.co/versus/1397/1746/~web2py_vs_djan

[web2py] Re: web2py - date picker issue

2020-05-06 Thread Scott Hunter
I have attached my file from the controller. > Could you please let me know where do I need to make the changes (i.e. > keepvalues = True) > > Regards, > Anuj > > On Tuesday, May 5, 2020 at 6:38:29 PM UTC+5:30, Scott Hunter wrote: >> >> If this is part of a form (w

[web2py] Re: web2py - date picker issue

2020-05-05 Thread Scott Hunter
ng to the current date even though I > am selecting any previous date. Do you have any suggestions to change this > default behavior? > > On Tuesday, May 5, 2020 at 5:22:30 PM UTC+5:30, Scott Hunter wrote: >> >> What do you mean by "redirected"? If you just m

[web2py] Re: web2py - date picker issue

2020-05-05 Thread Scott Hunter
What do you mean by "redirected"? If you just mean that the date field is reset to the current date, that is the same default behavior for all input fields. On Tuesday, May 5, 2020 at 12:44:31 AM UTC-4, Anuj Mahawar wrote: > > I am a beginner to the web2py. I am building an application with a d

Re: [web2py] Re: SQLFORM keepvalues - only 1 field

2020-04-30 Thread Scott Hunter
'form' doesn't > exist yet. > > I still think I must be missing something here > > -Jim > > > On Thursday, April 30, 2020 at 12:30:44 PM UTC-5, Scott Hunter wrote: >> >> Isn't "the next time through the method" when there is a n

Re: [web2py] Re: SQLFORM keepvalues - only 1 field

2020-04-30 Thread Scott Hunter
I need that value on the next time through the method. Therefore > I have to save it to my session and grab it the next time in. Am I missing > something? > > On Thu, Apr 30, 2020 at 12:19 PM Scott Hunter > wrote: > >> Since the value in question is part of the current

Re: [web2py] Re: SQLFORM keepvalues - only 1 field

2020-04-30 Thread Scott Hunter
edisplayed. I was hoping that the keepopts > argument to SQLFORM would allow you to specify which fields to keep, but it > seems that is used for something else. > > On Thu, Apr 30, 2020 at 11:48 AM Scott Hunter > wrote: > >> I recall doing this by "pre-populating&q

[web2py] Re: SQLFORM keepvalues - only 1 field

2020-04-30 Thread Scott Hunter
I recall doing this by "pre-populating" the field you want to keep with the old value. - Scott On Thursday, April 30, 2020 at 11:10:42 AM UTC-4, Jim S wrote: > > Does anyone know how I can have a form 'keepvalues' but only keep one > specific field value? I don't want it to keep the values for

Re: [web2py] Re: p4web auth issues

2020-02-23 Thread Scott Hunter
user = auth.get.user()['first_name'] On Sunday, February 23, 2020 at 9:23:06 PM UTC-5, Lovedie JC wrote: > > Thanks. > Before you replied I had tried : > user = auth.get.user()[first_name] > > With an error.. 'first_name' is not defined > Regards > > On Mon, Feb 24, 2020, 02:02 Val K > wrote: > >

[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread Scott Hunter
What error did it give you? Are you sure `details.email_address` is defined? On Sunday, February 23, 2020 at 8:13:07 AM UTC-5, mostwanted wrote: > > I did try it without the quotes & it still gave me an error! > > On Sunday, February 23, 2020 at 2:59:04 PM UTC+2, Scott Hunter

[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread Scott Hunter
Did you try removing the quotes around the address? - Scott On Saturday, February 22, 2020 at 4:56:04 PM UTC-5, mostwanted wrote: > > I've created an emailing form in my application but have substituted where > the email goes with a reference that contains the email, the problem is > that now

[web2py] Re: Saving a view as an file/image

2020-01-26 Thread Scott Hunter
The FPDF module has an HTML Renderer which you might find useful. - Scott On Sunday, January 26, 2020 at 9:25:47 AM UTC-5, John Bannister wrote: > > Hi All, > > I have hit a bit of a stumbling block and would like to know if anyone > else has come across this and how to resolve it. > > Situation

[web2py] py4web won't create apps

2019-12-25 Thread Scott Hunter
I installed py4web via pip on a MacBook Pro running Catalina; it runs fine, and I can create new apps (by "hand"), but the dashboard & default apps don't get created, even if I run it with the -c flag. I'd be happy to dig into *why*, since this does not seem to be a common problem, but would li

[web2py] Re: Off topic : visual diagrams anyone ???

2019-12-01 Thread Scott Hunter
What is stopping you from using it *in* your web2py app? On Wednesday, November 27, 2019 at 12:58:48 PM UTC-5, Ramos wrote: > > Hard to find a tool like this for my web2py app > > https://mermaidjs.github.io/#/ > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Re: validators

2019-11-04 Thread Scott Hunter
You could write one to do this & use it where you need to. On Monday, November 4, 2019 at 12:00:47 AM UTC-5, T.R.Rajkumar wrote: > > sqlform filed validators do not check for the precision of decimal fields. > It would be nice it web2py validates the precision of fields. > -- Resources: - http:

[web2py] Re: 'Storage' object is not callable

2019-07-09 Thread Scott Hunter
`post_vars` isn't callable, but you are trying to call it on line 7. As I'm not sure what you are trying to do there, can't say what to do instead. On Monday, July 8, 2019 at 11:13:21 PM UTC-4, imran tube wrote: > > 'Storage' object is not callable > : where is my wrong my code view or control

[web2py] Re: How to pass the variable in Jquery in view to controller

2019-07-08 Thread Scott Hunter
The short answer is, you don't. Javascript is being executed in the browser; controller code is executed on the server. The longer answer is that the browser can make a request to the server (via ajax or some other mechanism) that can cause controller code to be executed. I think you'll need

[web2py] Re: Web3py

2019-05-12 Thread Scott Hunter
Note: if the folder, translations, that is being complained about is added, the app still can't be reached, but there is no longer an exception reported: just the 404 page. - Scott On Saturday, May 11, 2019 at 9:55:34 PM UTC-4, 黄祥 wrote: > > $ ./web3py-start applications/ > Dashboard is at: htt

[web2py] pyDAL -> jsDAL?

2019-04-29 Thread Scott Hunter
The direction from web2py to web3py seems to be applications where the server is responsible for (relatively) static pages which use Javascript for their dynamic aspects & talking to the server via an API, primarily for interaction w/ the database. In the spirit of Progressive Web Apps, one co

[web2py] Re: Web3py

2019-04-23 Thread Scott Hunter
I followed these directions as best I could: * There is no file named web3py.py. There is a file web3py-start; that seemed to work * No matter what URL I provide, I get a big red screen saying "404 Not Found" On Thursday, April 11, 2019 at 1:31:29 PM UTC-4, En Ware wrote: > > I git installed w

[web2py] Re: Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Scott Hunter
Shouldn't you ask them? On Monday, April 1, 2019 at 8:57:21 AM UTC-4, Ron Chatterjee wrote: > > Does anyone know why python anywhere only give option for 2.15 edition of > web2py? If I have to guess that's few years old. I asked the question > because I am not sure if they believe 2.15 is more s

[web2py] Re: How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-01 Thread Scott Hunter
This part of the web2py book might help: http://www.web2py.com/book/default/chapter/06#sum-avg-min-max-and-len On Monday, April 1, 2019 at 6:41:51 PM UTC-4, João Matos wrote: > > Hello, > > I have this SELECT in SQLite > > result = db.executesql( > "SELECT auth_user.id, auth_user.

[web2py] Re: Inject html markup with python code at run time

2019-03-24 Thread Scott Hunter
By putting your code in a string passed as an argument to XML, you are saying you want that string to be displayed as opposed to executed; the fact that it happens to be code is irrelevant. If you want the code to run on the server, creating the page to be displayed, you can just put it in your

[web2py] Bad MySQL migration when there shouldn't be one?

2019-02-26 Thread Scott Hunter
I'm seeing the following error in a web2py 2.14.6 app @ pythonanywhere OperationalError: (1553, "Cannot drop index 'f_User__idx': needed in a foreign key constraint") This is an app that is using MySQL. I have not changed any models, and all migrations are disabled, either of which not being t

[web2py] Re: Problem w/ v2.16.1 & python3 & rest api

2018-01-05 Thread Scott Hunter
coverage. - Scott On Friday, January 5, 2018 at 2:46:22 AM UTC-5, Dave S wrote: > > > > On Thursday, January 4, 2018 at 1:07:24 PM UTC-8, Scott Hunter wrote: >> >> If I try to user curl to call the api_get_user_email function in the >> default controller of the we

[web2py] Problem w/ v2.16.1 & python3 & rest api

2018-01-04 Thread Scott Hunter
If I try to user curl to call the api_get_user_email function in the default controller of the welcome app, using a fresh copy of web2py & under python 3.6.3, the following ticket gets generated: a bytes-like object is required, not 'str'Version web2py™ Version 2.16.1-stable+timestamp.2017.11.1

[web2py] Remote database synchronization

2017-12-08 Thread Scott Hunter
The technique put forth in Chapter 6 of the book says every record must "reference the UUID instead of the id", and the example redefines a field of db.dog from `Field('owner', db.person),` to Field('owner', length=64),``, adding `db.dog.owner.requires = IS_IN_DB(db,'person.uuid','%(name)s')`.

[web2py] Scheduler on PythonAnywhere not working since Dec 1

2017-12-06 Thread Scott Hunter
Since Dec 1, I can no longer schedule tasks in the scheduler for my web2py (Version 2.14.6-stable+timestamp.2016.05.10.00.21.47) app on PythonAnywhere.com; the task log is a LONG permutation of the following 3 lines: ERROR:web2py.scheduler.giles-livetask1#7087:error popping tasks ER

[web2py] Possible bug using | at end of element of list:string

2017-11-29 Thread Scott Hunter
Suppose I have a list:string field, and I put `A|B` in for one of the elements. This works as expected, and gets represented internally as `|A||B|`. Now suppose I break that up into 2 elements: `A|` followed by `B`. When I submit the form (a smart grid, in my case), it comes back with a singl

[web2py] Re: web2py 2.15.3-stable: trying to re-bind a field?

2017-08-08 Thread Scott Hunter
> On Tuesday, August 8, 2017 at 10:20:58 PM UTC-4, Scott Hunter wrote: >> >> I have code in my db.py model to add fields to auth_user: >> >> auth_extras = [ >> Field('paid', 'boolean',writable=False,readable=False), >> Field(&#x

[web2py] web2py 2.15.3-stable: trying to re-bind a field?

2017-08-08 Thread Scott Hunter
I have code in my db.py model to add fields to auth_user: auth_extras = [ Field('paid', 'boolean',writable=False,readable=False), Field('paidwhen', 'date',writable=False,readable=False), Field('paidamount', 'float',writable=False,readable=False), Field('paymentid',writable=False,re

[web2py] Re: web2py using "foreign" form

2017-03-23 Thread Scott Hunter
nds to the credit card number appropriately (except for giving me back the token). On Thursday, March 23, 2017 at 6:08:59 PM UTC-4, Anthony wrote: > > On Thursday, March 23, 2017 at 10:20:29 AM UTC-4, Scott Hunter wrote: >> >> That's what I would have thought, but i

[web2py] Re: web2py using "foreign" form

2017-03-23 Thread Scott Hunter
input fields). Even more confused now, Scott On Thursday, March 23, 2017 at 9:28:50 AM UTC-4, Anthony wrote: > > If the form is submitted via a POST request, everything will be in > request.post_vars (request.post_vars is not specific to web2py-generated > forms -- it is simply where posted data are

Re: [web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-23 Thread Scott Hunter
pe.py provides. > I'll try to provide more information this evening. > > On Thu, Mar 23, 2017 at 2:47 AM Dave S > > wrote: > >> >> >> On Wednesday, March 22, 2017 at 6:42:42 PM UTC-7, Dave S wrote: >>> >>> >>> >>> On Wedn

[web2py] web2py using "foreign" form

2017-03-23 Thread Scott Hunter
Suppose I have a form whose contents are generated by a script, and I do not know what those contents are; in particular, I may not know what the fields are within that form, but I certainly have no control over them. I can specify the controller that I want that form to submit to (via the `ac

[web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-22 Thread Scott Hunter
>From the deafening silence, apparently this was not enough detail for anyone to even ask what other details I need to provide, so I'll do it myself: what other info do I need to provide to get some kind of response? - Scott On Wednesday, March 22, 2017 at 4:22:24 AM UTC-4, Scott Hunt

[web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-22 Thread Scott Hunter
need is, I can't tell how to get it. I've been using web2py's Stripe module, but been getting errors about not using TSL1.2; so instead of trying to mess with that, thought I would go directly to using one of Stripe's supported methods. - Scott On Wednesday, March

[web2py] Using Stripe's Checkout w/ web2py

2017-03-21 Thread Scott Hunter
Has anyone been able to use Stripe's Checkout with web2py? If so, how did you do it? I'm having trouble getting the token it generates back. - Scott -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] Re: MySQL CSV load fails on pythonanywhere

2017-03-08 Thread Scott Hunter
source DB (which would presumably address the problem)? - Scott Note: I am not using the cpdb.py script to do this because it was never able to find DAL, even when I gave it a full path to the gluon directory On Wednesday, March 8, 2017 at 4:52:58 AM UTC-5, Scott Hunter wrote: > > When I

[web2py] MySQL CSV load fails on pythonanywhere

2017-03-08 Thread Scott Hunter
When I try to load a MySQL DB on pythonanywhere from a CSV generated from a SQLite DB using (literally) the same schema, I get the following: >>> db.import_from_csv_file(open("trials_export.csv","rb"))

[web2py] Re: Email using p7s file

2017-02-27 Thread Scott Hunter
The link reports "Account suspended", so that wasn't too useful; but I will check out sparkpost.com On Monday, February 27, 2017 at 3:38:27 PM UTC-5, Dave S wrote: > > > > On Friday, February 17, 2017 at 4:57:03 AM UTC-8, Scott Hunter wrote: >> >> Is it po

[web2py] Re: Email using p7s file

2017-02-26 Thread Scott Hunter
Hello? On Friday, February 17, 2017 at 7:57:03 AM UTC-5, Scott Hunter wrote: > > Is it possible to send email with web2py's Auth mailer using a .p7s file > to sign/encrypt it? If so, how? > > If not, I saw (very brief) documentation on how to use x509 encryption >

[web2py] Email using p7s file

2017-02-17 Thread Scott Hunter
Is it possible to send email with web2py's Auth mailer using a .p7s file to sign/encrypt it? If so, how? If not, I saw (very brief) documentation on how to use x509 encryption (top of Chapter 8), but wasn't clear on what the arguments that it needed were. - Scott -- Resources: - http://web

Re: [web2py] Re: Problem with limitby?

2016-12-14 Thread Scott Hunter
Dec 14, 2016 at 3:27 PM, Scott Hunter > wrote: > >> I have just tried it on a different OS X machine (but same version of the >> OS), and did not see the problem. And I didn't see it on pythonanywhere, >> so I guess it is just that one machine. >> >> - Sco

[web2py] Re: Problem with limitby?

2016-12-14 Thread Scott Hunter
On Tuesday, December 13, 2016 at 6:43:57 PM UTC-5, Scott Hunter wrote: >> >> If I make a fresh, new app from the Administrative Interface, and replace >> the contents of default.py with the following, it will print the first 20 >> records that should show up in the grid,

Re: [web2py] Re: Problem with limitby?

2016-12-14 Thread Scott Hunter
rintouts as well as >> the first page of the grid (after sorting on Myfield2) all have the same 20 >> records when I run it. Maybe someone else can try it on OSX. What happens >> if you run the OSX binary version of web2py? >> >> Anthony >> >> On

[web2py] Re: Problem with limitby?

2016-12-13 Thread Scott Hunter
If I make a fresh, new app from the Administrative Interface, and replace the contents of default.py with the following, it will print the first 20 records that should show up in the grid, first without using limityby (and using a counter to stop at 20), and then with limityby; the second is mi

[web2py] Re: Problem with limitby?

2016-12-13 Thread Scott Hunter
On Tuesday, December 13, 2016 at 11:57:48 AM UTC-5, Anthony wrote: > > On Tuesday, December 13, 2016 at 3:11:42 AM UTC-5, Scott Hunter wrote: >> >> The first 20 records appear in the same order in each case (using >> DBBrowser). How does that help? >> > > T

[web2py] Re: Issues w/ Stripe?

2016-12-13 Thread Scott Hunter
The problem was with appconfig.ini; I had moved the Stripe tokens into it, but left them surrounded by quotes. On Monday, December 12, 2016 at 9:04:24 PM UTC-5, Scott Hunter wrote: > > I have 2 appliances on a pythonanywhere web app, one a clone of the other, > both with a Stripe pay

[web2py] Re: Issues w/ Stripe?

2016-12-13 Thread Scott Hunter
12, 2016 at 6:04:24 PM UTC-8, Scott Hunter wrote: >> >> I have 2 appliances on a pythonanywhere web app, one a clone of the >> other, both with a Stripe payment page. One of them works, the other does >> not; when the form gets submitted, the one that fails shows

[web2py] Re: Problem with limitby?

2016-12-13 Thread Scott Hunter
(i.e., args that are not related to the grid itself), but you don't appear > to be using any request.args elsewhere in your code. In any case, even if > you do have some args to preserve, you would not want to include all of > request.args, because when a grid link is clicked, that will

[web2py] Re: Problem with limitby?

2016-12-12 Thread Scott Hunter
664,1689,1690,667,1692,1694,1696,673,1698,1700,1706,683,685,691,692,694,649,698,699,578,651,580,585,587,588,589,1686,1422,598,603,606,607,610,613,615,618,659,634,635,638)) ORDER BY t_dog.f_Dog_ID, t_dog.id LIMIT 20 OFFSET 0; On Monday, December 12, 2016 at 9:00:09 PM UTC-5, Anthony wrote

[web2py] Issues w/ Stripe?

2016-12-12 Thread Scott Hunter
I have 2 appliances on a pythonanywhere web app, one a clone of the other, both with a Stripe payment page. One of them works, the other does not; when the form gets submitted, the one that fails shows the following on the browser console: [Error] Failed to load resource: the server respon

[web2py] Re: Problem with limitby?

2016-12-12 Thread Scott Hunter
by web2py (check > db._timings, which you can view via response.toolbar()) as well as the SQL > you are running. > > Anthony > > On Sunday, December 11, 2016 at 11:49:53 PM UTC-5, Scott Hunter wrote: >> >> I'm using a SQLFORM.grid, using a query of the form: >&

Re: [web2py] Problem with limitby?

2016-12-12 Thread Scott Hunter
By using orederby you should see your problem go > away except if you really had found an issue that would be implementation > specific as you seems to point us in that direction. You can orderby over > table id if you have not special requirement on that matter. > > Richar

[web2py] Problem with limitby?

2016-12-11 Thread Scott Hunter
I'm using a SQLFORM.grid, using a query of the form: db.t_dog.id.belongs(dog_ids) But the listing is erratic; some records only appear when the list is sorted certain ways (except for the last page); entries on each page are in order, but entries between pages overlap. I thought the prob

[web2py] Re: SQLFORM.grid: using groupby disables create?

2016-12-03 Thread Scott Hunter
27;t be a bad idea to > at least allow the developer the option of enabling create with groupby. In > that case, though, we might have to default to create=False for backward > compatibility. > > Feel free to file a Github issue and refer to this thread. > > Anthony &

[web2py] sqlform.grid search numeric fields

2016-12-03 Thread Scott Hunter
When using the basic (as opposed to advanced) search function of an SQLFORM.grid, it only appears to look in text fields, such that if I enter a number, it doesn't find any matches unless that number appears in a text field (even if that field is not one of the ones displayed in the grid). Is t

[web2py] SQLFORM.grid: using groupby disables create?

2016-12-03 Thread Scott Hunter
I have a SQLFORM.grid in which I would like to use groupby as well as be able to create records. But when I supply the groupby parameter, the Add Record button disappears, and can be made to re-appear if the only thing I change is remove the groupby parameter. Is this a bug? If it is a featur

[web2py] Re: SQLFORM.grid and oncreate error

2016-12-03 Thread Scott Hunter
My bad; I was using concrete (the callback for AFTER a record has been created) instead of onvalidation (the one for BEFORE that). On Friday, December 2, 2016 at 11:17:57 PM UTC-5, Scott Hunter wrote: > > If the oncreate callback for a SQLFORM.grid sets form.errors to true, the > reco

[web2py] SQLFORM.grid and oncreate error

2016-12-02 Thread Scott Hunter
If the oncreate callback for a SQLFORM.grid sets form.errors to true, the record is not created; similarly, if form.errors. is set to an error message. However, shouldn't the form for adding the record return, and in the latter case, with the specified fields showing their error messages? In m

Re: [web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-10-30 Thread Scott Hunter
from > source > http://web2py.com/examples/static/web2py_src.zip > > If it also fails, it may give more info. > > On Tuesday, 25 October 2016 11:55:32 UTC-5, Scott Hunter wrote: >> >> Sure, but there's not much to see. >> >> When I launch the app (afte

Re: [web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-10-25 Thread Scott Hunter
us to me. - Scott On Tuesday, October 25, 2016 at 10:39:41 AM UTC-4, Roberto Perdomo wrote: > > I'm using Web2py 2.14.6 in sierra and cannot reproduce your errors. > > Can you show the errors or warnings? > > El 25 oct. 2016 10:36 AM, "Scott Hunter" > escribió: &

[web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-10-25 Thread Scott Hunter
Am I to interpret from the deafening silence that I am the only one seeing this problem? Even if that is the case, any ideas how I can resolve it, or where I might go to find any? - Scott On Wednesday, October 19, 2016 at 12:17:45 PM UTC-4, Scott Hunter wrote: > > When I download &

[web2py] Re: Efficiency in compiled appliance

2016-10-25 Thread Scott Hunter
: > > what would be the counter-arg here ? > > On Wednesday, May 18, 2016 at 9:42:50 PM UTC+2, Scott Hunter wrote: >> >> The web2py book, under Efficiency Tricks, says: >> >> >>- Do not put many functions in the same controller but use many >>

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-10-21 Thread Scott Hunter
You need single-quotes around flash.fadeOut("slow") Otherwise, as you have seen, it gets executed immediately instead of after a delay. On Tuesday, October 18, 2016 at 9:35:30 AM UTC-4, Marc Smith wrote: > > Hi, > > I'm relatively new to JS but the strange quote character at the > beginning (

[web2py] Re: insert list of dictionary

2016-10-20 Thread Scott Hunter
Your fields are of type string (the default); so either make string representations of your lists or declare the fields as lists of strings. On Wednesday, October 19, 2016 at 9:15:21 AM UTC-4, Tribo Eila wrote: > > Hi, > > supposed: > db.define_table('color', Field('blue'),Field('yellow'),Field(

[web2py] web2py_osx on Sierra (OSX 10.12)

2016-10-19 Thread Scott Hunter
When I download & run a fresh copy of the web2py_osx app, I get the usual warnings about it not being from a known source (b/c it is unsigned, I presume). In previous versions, when I told the Security System Preference panel to open it anyway, it did, and all was well. But now, soon after it

[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-22 Thread Scott Hunter
3:19:15 PM UTC-4, Anthony wrote: > > On Wednesday, September 21, 2016 at 1:16:29 PM UTC-4, Scott Hunter wrote: >> >> I think I understand; seems like something that should be documented, as >> well as able to be disabled. >> > > Is it causing a problem fo

[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Scott Hunter
I think I understand; seems like something that should be documented, as well as able to be disabled. On Wednesday, September 21, 2016 at 12:37:52 PM UTC-4, Anthony wrote: > > On Wednesday, September 21, 2016 at 9:36:14 AM UTC-4, Scott Hunter wrote: >> >> Here's a sim

[web2py] Re: SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Scott Hunter
If I have the controller function return a string if there is a 'records' variable, the second request is not made; however, then it does not redisplay the form. On Wednesday, September 21, 2016 at 9:36:14 AM UTC-4, Scott Hunter wrote: > > Here's a simple controller us

[web2py] SQLFORM.grid w/ selectable generates multiple requests

2016-09-21 Thread Scott Hunter
Here's a simple controller using an SQLFORM.grid w/ selectable: def open_requests(): print 'Req: %r' % request.vars query = ... form = SQLFORM.grid(query, csv=False, details=False, deletable=False , editable=False, searchable=False, create=False, selectable

[web2py] Re: app slow on pythonanywhere

2016-09-05 Thread Scott Hunter
I found the problem; migrations weren't being disabled because, while I had the correct settings in appconfig.ini, they were not being used properly in creating the db object. - Scott On Saturday, September 3, 2016 at 1:01:39 PM UTC-4, Scott Hunter wrote: > > I have an app which

[web2py] Re: app slow on pythonanywhere

2016-09-04 Thread Scott Hunter
I tried putting in your suggested migration settings (and reloaded); it is still spending about the same amount of time in fcntl.flock. - Scott On Sunday, September 4, 2016 at 7:27:08 AM UTC-4, 黄祥 wrote: > > for reload i think it's just for reload the configuration of web server > service (some

[web2py] Re: app slow on pythonanywhere

2016-09-04 Thread Scott Hunter
2016 at 7:01:39 PM UTC+2, Scott Hunter wrote: >> >> I have an app which runs *much* slower than expected on pythonanywhere. >> >> I enabled the profiler, and one thing stood out: on pythonanywhere, the >> function the most time was spent in, by far, is fcntl.flock from

[web2py] Re: app slow on pythonanywhere

2016-09-03 Thread Scott Hunter
A number of times. What is that supposed to have accomplished? On Saturday, September 3, 2016 at 3:23:56 PM UTC-4, 黄祥 wrote: > > had you already tried to reload pythonanywhere web app? > > best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] app slow on pythonanywhere

2016-09-03 Thread Scott Hunter
I have an app which runs *much* slower than expected on pythonanywhere. I enabled the profiler, and one thing stood out: on pythonanywhere, the function the most time was spent in, by far, is fcntl.flock from inside portalocker while loading the models. In fact, when run locally, portalocker i

[web2py] Locating Table Definitions in a Module

2016-08-31 Thread Scott Hunter
Is there any benefit to putting the code to define the database tables in a function that has been defined in a module, but gets called from a model, performance-wise? - Scott Hunter -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: How to invoke recurring Scheduler task

2016-08-22 Thread Scott Hunter
at checks before inserting > if another instance has been already queued and call that protected > controller once in a while (i.e. once per day) > > On Monday, August 22, 2016 at 3:10:44 AM UTC+2, Scott Hunter wrote: >> >> The book seems pretty clear about the call to us

[web2py] How to invoke recurring Scheduler task

2016-08-21 Thread Scott Hunter
The book seems pretty clear about the call to use to start a recurring task. What I am not clear on is the best way to invoke this code so that only one copy of the task is created (assuming the scheduler machinery will handle making sure that it keeps recurring). - Scott -- Resources: - h

[web2py] Re: Problem with Scheduler on pythonanywhere

2016-05-31 Thread Scott Hunter
les, letting scheduler recreate them and see what happens. > > On Monday, May 30, 2016 at 1:53:04 PM UTC+2, Scott Hunter wrote: >> >> I have an appliance hosted on pythonanywhere which uses the Scheduler >> (invoked using a separate web2py process with the -K switch). >> >

[web2py] Problem with Scheduler on pythonanywhere

2016-05-30 Thread Scott Hunter
I have an appliance hosted on pythonanywhere which uses the Scheduler (invoked using a separate web2py process with the -K switch). This setup in my test environment (OS X at home) works fine, but on pythonanywhere, the scheduler process generates a stream of errors like: ERROR:web2py.scheduler

[web2py] Scheduler menu empty (on purpose?)

2016-05-26 Thread Scott Hunter
In the latest stable release (2.14.6), the Scheduler menu is empty. When I looked in widget.py, I see this: def update_schedulers(self, start=False): applications_folder = os.path.join(self.options.folder, 'applications') apps = [] ##FIXME - can't start scheduler in

[web2py] Efficiency in compiled appliance

2016-05-18 Thread Scott Hunter
The web2py book, under Efficiency Tricks, says: - Do not put many functions in the same controller but use many controllers with few functions. When an appliance is compiled, each of the functions is compiled into its own .pyc file, the same as would happen if they were in different func

[web2py] Re: Sending email w/ text & html

2016-04-13 Thread Scott Hunter
x27;Content-Type' : 'text/html'}) > > On Tuesday, April 12, 2016 at 8:28:56 PM UTC-4, Scott Hunter wrote: > >> According to the current book, I should be able to do this: >> >> mail.send('y...@example.com', >> 'Message subject', >>

[web2py] Sending email w/ text & html

2016-04-12 Thread Scott Hunter
According to the current book, I should be able to do this: mail.send('y...@example.com', 'Message subject', ('Plain text body', 'html body')) When I try: msg = ("Text only","HTML Only") mail.send(to='y...@example.com', subject=subject, message=msg ) the text part

[web2py] Re: Problems validating SQLFORMs w/o DB IO

2016-01-06 Thread Scott Hunter
DB IO is requested), and I don't get the exception once the appropriate `requires` parameter is supplied, but it doesn't seem like this should be raising an exception. On Sunday, January 3, 2016 at 9:46:34 PM UTC-5, Scott Hunter wrote: > > If I create a SQLFORM from a table, but

[web2py] Problems validating SQLFORMs w/o DB IO

2016-01-03 Thread Scott Hunter
pass validation. Has this always been the behavior? If so, can someone explain the rationale behind it? This is using Version 2.13.4-stable+timestamp.2015.12.26.04.59.39 - Scott Hunter -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Field('upload') : problem with file name

2015-07-21 Thread Scott Hunter
ename. > If this hash exceeds 512 - len(tablename+code+extension) the file is > truncated. > Mind this is still a lot of characters. > > Massimo > > > On Monday, 20 July 2015 20:36:50 UTC-5, Scott Hunter wrote: >> >> Is this an oversight or a conscious decisi

[web2py] Re: Field('upload') : problem with file name

2015-07-20 Thread Scott Hunter
filename. > > On Monday, 20 July 2015 05:28:02 UTC-5, Scott Hunter wrote: >> >> Where is this spelled out in the documentation? I could not find it. >> >> - Scott >> >> On Monday, July 20, 2015 at 2:24:24 AM UTC-4, Massimo Di Pierro wrote: >>&g

[web2py] Re: Field('upload') : problem with file name

2015-07-20 Thread Scott Hunter
rsions of windows > the make file length has been reduced so you have to do > > Field(name, 'upload', size=200) > > and all filenames will be limited to 200 bytes. > > On Sunday, 19 July 2015 21:06:42 UTC-5, Scott Hunter wrote: >> >> This is not only a

[web2py] Re: Field('upload') : problem with file name

2015-07-19 Thread Scott Hunter
This is not only an issue with Windows; any filesystem with a filename limit (however big) can hit this problem. As this is all being handled by web2py, and the user is selecting the file to upload, where would this "logic" go, and why isn't web2py handling it? - Scott On Saturday, March 16,

[web2py] Re: Autocomplete widgets and digital signatures

2015-06-23 Thread Scott Hunter
to prevent DoS attacks. > > That said you can can do URL(..., user_signature=True, hash_vars = False) > along with @auth.requires_signature(hash_vars=False) > > so you hash the signature but not vars which would be added later by the > autocomplete JS. > hash_vars can also be a

[web2py] Re: Autocomplete widgets and digital signatures

2015-06-22 Thread Scott Hunter
vars should be included in the signature. You cannot sign the autocomplete > field because that is generated by JS after web2py has already computed the > signature. > > On Friday, 19 June 2015 15:31:58 UTC-5, Scott Hunter wrote: >> >> Autocomplete widgets do not app

[web2py] Re: Autocomplete widgets and digital signatures

2015-06-21 Thread Scott Hunter
hole, although not a terrible one. It still seems like this shouldn't be necessary. - Scott On Friday, June 19, 2015 at 4:31:58 PM UTC-4, Scott Hunter wrote: > > Autocomplete widgets do not appear to work within controller functions > that require a digital signature (at least not f

[web2py] Autocomplete widgets and digital signatures

2015-06-19 Thread Scott Hunter
Autocomplete widgets do not appear to work within controller functions that require a digital signature (at least not for me). Is this a bug, a feature, or a mistake on my part? - Scott -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Structure of compiled apps

2015-05-27 Thread Scott Hunter
When an app gets compiled, each function in each controller that takes no arguments (i.e. has an exposed URL) is represented by a .pyc file. But where do the controller functions that do not correspond to exposed URLs go? - Scott -- Resources: - http://web2py.com - http://web2py.com/book (Doc

[web2py] Re: Bypassing Opening Dialog in Windows Binary Startup

2015-04-30 Thread Scott Hunter
44:55 AM UTC-4, Scott Hunter wrote: > > If I run the Windows Binary without supplying an administrator password on > the command line, web2py presents a dialog from which you can change the > server address, port & admin password before starting the server; when the > server

  1   2   >