[web2py] How to do 3 (hopefully not too weird) things w/ my DB definition in models

2010-10-05 Thread Scott Hunter
there a way to tell when a define_table has to actually create the table, so I can stuff in an initial record? I suppose I could do a query after the definition, but then it will get done for every request. Thanks in advance, Scott Hunter P.S. I'm currently using v1.65.10; if a newer versio

[web2py] Re: How to do 3 (hopefully not too weird) things w/ my DB definition in models

2010-10-05 Thread Scott Hunter
field unique, > after there is data in it, web2py has no way of knowing if the data > already in was unique or not and there is no easy way of checking. > > On Oct 5, 4:13 pm, Scott Hunter wrote: > > > > > 1) I want to let migration add a UNIQUE=true field to a table, whi

[web2py] Re: How to do 3 (hopefully not too weird) things w/ my DB definition in models

2010-10-06 Thread Scott Hunter
revent the update from accidentally happening twice? > > Massimo > > On Oct 5, 6:26 pm, Scott Hunter wrote: > > > > > Thanks for the quick reply! > > > The situation I'm interested in is where the field doesn't exist and > > I'm adding it

[web2py] Re: How to do 3 (hopefully not too weird) things w/ my DB definition in models

2010-10-06 Thread Scott Hunter
_need_to_do() > > On Oct 6, 8:48 am, Scott Hunter wrote: > > > > > My scenario is that I have version X of an appliance which is missing > > the field in question, and I add it to the model for version X+1. > > Currently, web2py will handle adding that field to the approp

[web2py:23227] Re: Auth forwarding

2009-06-03 Thread Scott Hunter
I've just downloaded the MacOSX v 1.63.3, and its exhibiting this same problem. I had gotten an earlier copy through launchpad, and the problem was indeed fixed. Is it possible the pre-compiled version isn't up to date? I noticed that the web2py executable (in the MacOS directory) is dated 1/8/

[web2py:23228] Re: Auth forwarding

2009-06-03 Thread Scott Hunter
ed, and is building the login page; why should it matter HOW it was requested?) Thanks for any help, Scott On Jun 3, 5:21 pm, Scott Hunter wrote: > I've just downloaded the MacOSX v 1.63.3, and its exhibiting this same > problem.  I had gotten an earlier copy through launchpad, and the

[web2py:27983] Hacking the Windows version of web2py.py

2009-08-04 Thread Scott Hunter
In the source & Mac-standalone versions of web2py, one can (and I did :)) change/replace the file web2py.py in order to modify the server application. (In my case, I'm adding a list of server IPs to choose from and spawning an extra process; the latter could presumably be done elsewhere, but it i

[web2py:29630] web2py complaints & rebuttals

2009-08-29 Thread Scott Hunter
A colleague has lodged the following complaints about web2py, and I'd like to run my responses by this group in order to correct/strengthen those responses. Complaint #1: No real-time debugging (i.e. proper step-debugging in a real IDE) Response #1: web2py, being a framework, does not include a f

[web2py:29984] web2py testing example(s)

2009-09-03 Thread Scott Hunter
Could someone point me to good (however you define "good") example of test code for a web2py appliance? It looks like the "test" links in admin only refer to doctests, but I can't find examples of what these might look like for a web2py appliance. There is an entry in AlterEgo (#213) which sets

[web2py:33515] Problem w/ migration

2009-10-23 Thread Scott Hunter
I've added the following field to the table worksheet: SQLField('mysortkey', length = 40, default = 'something' ) I get a ticket reporting: Traceback (most recent call last): File "/home/scott/web2py_1_68_2/gluon/restricted.py", line 184, in restricted exec ccode in environment File "/h

[web2py:21475] Widget problem w/ duplication

2009-05-08 Thread Scott Hunter
Just downloaded v 1.61.4 (Mac), and I'm having a problem w/ widgets. For example: def ta_widget(field,value,nr): "Widget to allow size of textarea to be specified"" return TEXTAREA("xyz", _type="text", _class="text", _rows=nr, _cols=40, _nam

[web2py:21482] Re: Widget problem w/ duplication

2009-05-08 Thread Scott Hunter
ssage). Thanks again, Scott On May 8, 10:46 am, mdipierro wrote: > I cannot reproduce the problem but there is a typo in your code > >         "Widget to allow size of textarea to be specified"" > > should be > >         "Widget to allow size of textarea to

[web2py:21500] Re: Widget problem w/ duplication

2009-05-08 Thread Scott Hunter
t actually it is a bigger > > problem that it seems. With fix is that if the widget is too complex > > it may not display the error (because it is not obvious where the > > error should be displayed). > > I will keep working on this but let me know if this is fine for y

[web2py:21791] Auth forwarding

2009-05-13 Thread Scott Hunter
I'm trying out the Auth tool (very sweet!), and wondering if it can handle the following: I've decorated a controller/function to require a login, and auth dutifully redirects me to a login page, and properly processes the login. But when I've logged in, I'd like it to go to the page I originall

[web2py:21799] Re: Auth forwarding

2009-05-13 Thread Scott Hunter
, mdipierro wrote: > What you want is the default behavior of the web2py in trunk. > Are you using 1.61.4? > > Massimo > > On May 13, 11:17 am, Scott Hunter wrote: > > > > > I'm trying out the Auth tool (very sweet!), and wondering if it can > > hand

[web2py:21925] Re: sqlite and threading

2009-05-15 Thread Scott Hunter
I hit this one a while back; its a limitation of SQLite. * You could create a new process to access the DB, but that's probably not very safe (they really mean the Lite part of the name!) * You could switch to a DB, like MySQL, which does support concurrent access * You could have your thread a

[web2py:9917] Windows executable and command line options

2008-10-07 Thread Scott Hunter
Is it possible to supply command line options to the windows executable version (web2py.exe) of web2py, either explicitly or via a config file, and if so, how? (I see that I can specify a config file w/ a command line option - "that's some catch, that catch-22" :) Thanks in advance, Scott --~--

[web2py:9982] Daemons as Threads

2008-10-08 Thread Scott Hunter
Using the shell command-line option of web2py, one can create a daemon with full access to the DB that the webserver has. Is it possible to do something similar w/ a thread created within web2py? When I tried, I got complaints that my db variable wasn't defined; then I tried to include my model

[web2py:10008] Re: Daemons as Threads

2008-10-09 Thread Scott Hunter
ey take long. > I principle a model, view controller can start its own thread but you > should pass a SQLDB object to it. It needs to instantiate its own > connection to the database and commit or rollback explicitly. > > Massimo > > On Oct 8, 4:42 pm, Scott Hunter <[EMAIL PR

[web2py:10359] Re: Python 2.6 anyone?

2008-10-17 Thread Scott Hunter
When trying to run web2py off of Python 2.6, we got the following error from code that works fine under Python 2.5.x (note that the error trace never ventures out of the web2py code). Our immediate solution is to use the older Python, but thought I'd point it out (this is run on a Windows 2000 SP

[web2py:10488] web2py on an iPhone?

2008-10-20 Thread Scott Hunter
The subject pretty much says it: will web2py run on an iPhone, and if not, what are (or might be) the obstacles that prevent it? - sbh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To

[web2py] Insert works using SQLite, not GAE/Datastore

2013-01-28 Thread Scott Hunter
To elaborate on title: I have a simple web2py app, from which I can insert records into a particular table (using a smart grid, or from within a controller), but trying to do so with the app posted to GAE, it fails (for either method). Operations using other tables work fine. I believe it has

[web2py] Re: Insert works using SQLite, not GAE/Datastore

2013-01-28 Thread Scott Hunter
As requested, here is the traceback: In FILE: /base/data/home/apps/s~sbhweb2py/1.364873083036857122/applications/ppt_demo/controllers/default.py Traceback (most recent call last): File "/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/restricted.py", line 212, in restricted ex

[web2py] Re: Insert works using SQLite, not GAE/Datastore

2013-01-28 Thread Scott Hunter
I entered 15.0 in the form, which sure looks like a float to me. If I had entered a non-float, automatic validation should have caught it before the appengine sdk was called to do a set. And when I used an insert statement myself using the DAL, I tried hard-coding a 10.0 for that field -- same

[web2py] Re: Insert works using SQLite, not GAE/Datastore

2013-01-28 Thread Scott Hunter
OK, it seems that GAE isn't fond of floats, but is quite happy with doubles -- its now happy with inserting both from a smartgrid-created form and from DAL calls. (I couldn't define any fields directly b/c the table/entity no longer appeared.) Thanks. On Monday, January 28, 2013 7:37:52 PM UT

[web2py] Re: Insert works using SQLite, not GAE/Datastore

2013-01-29 Thread Scott Hunter
Sorry - yes, I changed the model, replacing the floats with doubles. On Tuesday, January 29, 2013 4:33:12 AM UTC-5, Alan Etkin wrote: > > > OK, it seems that GAE isn't fond of floats, but is quite happy with > doubles > > Good to know, but, how did you fix GAE?. Have you changed your model? This

[web2py] web2py under GAE: disabling indexes

2013-02-21 Thread Scott Hunter
As I understand it, the GAE datastore will automatically create an index for every field of every table (to facilitate queries using single fields); those requiring multiple fields also get generated, but will get added to index.yaml by the SDK when tested locally. Since these are created outsi

[web2py] Re: web2py under GAE: disabling indexes

2013-02-21 Thread Scott Hunter
can check if the DAL has a secret way to handle it, and/or create a > patch to allow it. > > may i ask what advantage you are hoping to achieve by skipping those > indexes? i've left them on for fear of making a bad choice that i can't > revert. > > christian &g

[web2py] Re: web2py under GAE: disabling indexes

2013-02-22 Thread Scott Hunter
hours per > day on my largest paid application. :) > > cfh > > On Thursday, February 21, 2013 5:59:06 PM UTC-8, Scott Hunter wrote: >> >> According to >> https://developers.google.com/appengine/docs/python/datastore/indexes#Unindexed_Properties, >> >>

[web2py] Re: web2py under GAE: disabling indexes

2013-02-25 Thread Scott Hunter
rride those > default properties with what you want (there are a few techniques for not > explicitly listing fields, depending on which technique you are using the > answer here is different. > > this patch against HG trunk this AM might work (i say might cause i have > not te

[web2py] Re: web2py under GAE: disabling indexes

2013-02-26 Thread Scott Hunter
Scott On Tuesday, February 26, 2013 1:04:12 AM UTC-5, howesc wrote: > > it looks like you have a typo "custom_qualifer" vs "custom_qualifier" > > On Monday, February 25, 2013 6:44:14 PM UTC-8, Scott Hunter wrote: >> >> I applied the patch, and added

[web2py] Re: web2py under GAE: disabling indexes

2013-02-26 Thread Scott Hunter
he indexes DOES make a difference; with the changes above, instead of using up over 30% of my quota, I'm "only" using 23%. If I can get the strings unindexed, and take out the web2py-supplied fields (created_by & _on, modified_by & _on, and maybe is_active), that should g

[web2py] Re: web2py under GAE: disabling indexes

2013-02-26 Thread Scott Hunter
wesc wrote: > > here's an updated DAL patch to try. > > thanks for trudging through this with us! > > cfh > > On Tuesday, February 26, 2013 3:36:30 PM UTC-8, Scott Hunter wrote: >> >> I'm working from Version 2.3.2 (2012-12-17 15:03:30) stable &g

[web2py] Re: web2py under GAE: disabling indexes

2013-02-28 Thread Scott Hunter
; web2py. > > thanks, > > cfh > > On Tuesday, February 26, 2013 6:31:52 PM UTC-8, Scott Hunter wrote: >> >> With the latest patch, I was able to disable indices on the string fields >> I wanted to. Unfortunately (for me), I've just about used up my quota,

[web2py] Finding out why a form wasn't accepted

2013-08-16 Thread Scott Hunter
I have an (admittedly) complex form, which isn't being accepted upon submission, but form.errors is empty. How would I go about determining the reason for the rejection? - Scott -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubs

[web2py] Auth-less authentication

2013-08-16 Thread Scott Hunter
For historical reasons, I have an appliance which does not use Auth, but its own table of users. Passwords get stored in a similar way (that is, using a normal SQLFORM and a password field). How, then, can I verify a user's password, since I am not using auth & thus do not have (direct) acces

[web2py] Modifying auth.signature

2013-08-26 Thread Scott Hunter
Is there a way to use a modified version of auth.signature (in my particular case, adding a custom_qualifier to each field) that doesn't involve making a Table out of a clone of the set of fields with the desired modification, but would still be useable as the original is? Thanks in advance, Sc

[web2py] Re: Modifying auth.signature

2013-08-28 Thread Scott Hunter
..), ) > > On Monday, 26 August 2013 20:06:41 UTC-5, Scott Hunter wrote: >> >> Is there a way to use a modified version of auth.signature (in my >> particular case, adding a custom_qualifier to each field) that doesn't >> involve making a Table

[web2py] list:string field in auth_user

2013-09-29 Thread Scott Hunter
I have added a list:string field to my auth_user table using auth.settings.extra_fields: auth.settings.extra_fields['auth_user'] = [ Field('f_dtf', type='list:string', custom_qualifier=dict()) ] The new field shows up fine. But when I try to manipulate that field from the Profile page,

[web2py] Re: gae boilerplate vs web2py

2013-10-16 Thread Scott Hunter
Bootstrap is included w/ web2py, and the provided scaffolding detects if you are running in GAE and sets up the DAL accordingly. Which means you can develop running web2py "natively" and switch to GAE w/o having to change any code. The section of the book on deployment recipes goes into more d

[web2py] Re: GAE compatability with recent web2py versions

2013-10-29 Thread Scott Hunter
Don't know if this helps, but I see that the query for affl uses belongs, and I'm seeing the following in my GAE log for a query that uses belongs: File > "/Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py", > line 4802, in BELONGS > raise SyntaxError("Not supported"

[web2py] Re: GAE compatability with recent web2py versions

2013-10-30 Thread Scott Hunter
ed 'belongs' on GAE so long as the set contained >> 30 or fewer members (by experiment, not documented). I can see how this >> limited support may have been dropped in a DAL rewrite! >> >> On Tuesday, October 29, 2013 9:49:35 PM UTC-4, Scott Hunter wrote: >>&

[web2py] Re: GAE compatability with recent web2py versions

2013-10-30 Thread Scott Hunter
tance(second,(list, tuple)): > raise SyntaxError("Not supported") > ... > > So perhaps you are passing something to belongs which is not a list or > tuple. It is possible that in the past we did not check. > > On Wednesday, 30 October 2013 13:28:05 UT

[web2py] Re: Ticket issued: unknown after upgrade to 2.7.4 from 2.4.6 and running on GAE SDK

2013-10-31 Thread Scott Hunter
Did you look in the Logs in the GAE Dashboard for your app? That should at least give you the trace for the error, so you are not flying completely blind. - Scott -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https

[web2py] Use view to generate a string

2013-11-07 Thread Scott Hunter
Is it possible to use a view to generate a string? In this particular case, I want to generate a snippet of HTML & cache it away. I suppose this could be done using straight python & helpers, but a view seems so much more natural. - Scott -- Resources: - http://web2py.com - http://web2py.co

[web2py] MENU helper's menu item 2nd argument ignored?

2013-11-17 Thread Scott Hunter
As I understand it, the second argument in a menu item (which does not seem to be documented in the book) indicates if the item is disabled (True) or not (False). In fact, in the menu generated by the app wizard, this argument is given an expression comparing the same URL() as used for the men

[web2py] Markdown in web2py support for raw HTML

2013-11-17 Thread Scott Hunter
As I understand it, Markdown allows for raw HTML to be included, so long as it is set unindented in its own "paragraph". But when I try the example from the Markdown spec (http://daringfireball.net/projects/markdown/syntax#html), it gets escaped. My view code: {{extend 'layout.html'}} > {{fro

[web2py] Re: Markdown in web2py support for raw HTML

2013-11-17 Thread Scott Hunter
I added blank lines before & after the raw HTML; it still got escaped. On Sunday, November 17, 2013 9:56:08 PM UTC-5, Scott Hunter wrote: > > As I understand it, Markdown allows for raw HTML to be included, so long > as it is set unindented in its own "paragraph". But

[web2py] Re: Markdown in web2py support for raw HTML

2013-11-18 Thread Scott Hunter
The way Markdown is used from WIKI, it prevents the use of raw HTML. On Sunday, November 17, 2013 10:18:45 PM UTC-5, Scott Hunter wrote: > > I added blank lines before & after the raw HTML; it still got escaped. > > On Sunday, November 17, 2013 9:56:08 PM UTC-5, Scott Hunter w

[web2py] uploads & GAE

2013-11-23 Thread Scott Hunter
Are there any issues with using the various upload-related Field options when runnning under GAE? In particular, I'm wondering about the uploadfolder & uploadseparate options. How would using these affect using response.download in a controller? - Scott -- Resources: - http://web2py.com -

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

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

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

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

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

[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

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

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

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

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-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
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: uploads & GAE

2013-11-23 Thread Scott Hunter
r 23, 2013 11:24:31 AM UTC-8, Niphlod wrote: >> >> If I'm not mistaken, GAE filesystem is not writable your only option >> is to store the file into the database >> >> On Saturday, November 23, 2013 1:36:43 PM UTC+1, Scott Hunter wrote: >>> >>> A

[web2py] Re: One of the best things that happened to web2py

2013-11-24 Thread Scott Hunter
This looks terrific -- I was able to pack a site I had built locally, load it up to PA, and it ALMOST all worked. I have uploaded images, whose URLS are all of the form /download/filename, where filename is the name of a file in the uploads folder (which I could verify from PA's dashboard), non

[web2py] After upgrade to 2.8.2: foreign key constraint failed

2013-12-03 Thread Scott Hunter
I have a site which, after upgrading to 2.8.2 (and clearing out the sessions), when I try update a record via a smartgrid or via admin, I get the error in the title. I tried the same action on the copy of the site I had made just before upgrading, without any problems. -- Resources: - http://

[web2py] Re: After upgrade to 2.8.2: foreign key constraint failed

2013-12-04 Thread Scott Hunter
figure out what is wrong > > Paolo > > On Wednesday, December 4, 2013 3:26:32 AM UTC+1, Scott Hunter wrote: >> >> I have a site which, after upgrading to 2.8.2 (and clearing out the >> sessions), when I try update a record via a smartgrid or via admin, I get >> the e

[web2py] Re: After upgrade to 2.8.2: foreign key constraint failed

2013-12-04 Thread Scott Hunter
PTY_OR around what the manual says is the default validator. On Wednesday, December 4, 2013 3:30:56 PM UTC-5, Vch H wrote: > > I have this problem too. > Where I should specified validators? > > On Wednesday, December 4, 2013 6:00:43 PM UTC+2, Scott Hunter wrote: >> >

[web2py] Jump to specific record with smartgrid

2013-12-15 Thread Scott Hunter
Is there a way to have a link go to a controller function that uses a smart grid, but instead of going to the top-level list view, goes directly to a record to be edited? It looks like when going to such a page from the smart grid's list, it includes a signature which, if left out, causes a "n

[web2py] Problem w/ cpdb.py script

2013-12-22 Thread Scott Hunter
I'm trying to use the cpdb.py script to copy one sqlite db to another. It makes the tables & exports the old data to its own satisfaction, but when it tries to import the data, I get: EXCEPTION: could not make a copy of the database foreign key constraint failed I had run into a similar proble

[web2py] Re: Problem w/ cpdb.py script

2013-12-23 Thread Scott Hunter
Note that, when I tried to use the script to copy to a MySQL DB on pythonanywhere, I got a 150 error, that it couldn't create an auth table, and this may be related to foreign keys as well. - Scott On Sunday, December 22, 2013 3:36:47 PM UTC-5, Scott Hunter wrote: > > I'm t

[web2py] Re: Problem w/ cpdb.py script

2014-03-21 Thread Scott Hunter
I modified the script to compute a "safe" order (so no table is created before any that it references), although it looks like the original order is fine. But when it tries to define the first table (auth_cas, which has no references), I get: (1005, "Can't create table xxx.auth_cas' (errno: 15

  1   2   >