[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: 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] 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: 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] 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: 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] 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: 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: 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] 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-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] Controller vs. appliance

2014-05-01 Thread Scott Hunter
Are there any performance benefits to be gained by moving some functionality from one appliance's controller into its own appliance, but still on the same server, assuming it still accesses the same database as before (in my case, it is a MySQL DB)? (Moving to a separate server, in this case,

[web2py] Re: Controller vs. appliance

2014-05-01 Thread Scott Hunter
Suppose I have an appliance A1 w/ some functionality within a specific controller. I could move that controller into a new appliance A2, which will still access the same database that A1 does. My question is: is there any performance benefit to doing so? (Note that this is orthogonal to any

[web2py] Web2py security questions

2015-03-27 Thread Scott Hunter
1. Does web2py employ, allow or support any anti-framing measures, to prevent "an attack that can trick the user into clicking on the link by framing the original page and showing a layer on top of it with dummy buttons". If so, any pointers to either documentation describing how these are pre

[web2py] Re: Web2py security questions

2015-03-28 Thread Scott Hunter
I did; it says nothing about the specific things I asked about (or if it does, I cannot tell); that is why I asked. If that section of the book *does* address my questions, could someone point me to where in that section it does so? For example, there is a reference to preventing CSRF, but not

[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

[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] 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] 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: 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] 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: 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] 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] 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

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] 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

[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] 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 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] 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] 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] 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] 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] 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] Bypassing Opening Dialog in Windows Binary Startup

2015-04-29 Thread Scott Hunter
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 is started, it opens its home page in the default browser, printin

[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

[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] 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] 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] 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-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: 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: 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-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-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: 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: '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: 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: 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] 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: 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] 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: 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

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: 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: 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

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
'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

[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

[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-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: 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: 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: 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

<    1   2