[web2py] Alternate solutions for the SELECT generated by list:reference, multiple=True

2015-01-18 Thread Wes Hall
Problem: db field uses type='list:reference *other_table*', multiple=True. I need to an easy-to-use UI to search the referenced table, offer auto-complete and create a separate input for each selection to make selecting multiple options deliberate and obvious. I started out with something along

[web2py] Re: FORM factors (controlling input box size)

2015-01-18 Thread Wes Hall
Any issues with using jQuery? In your controller: INPUT(_name='left', requires=[IS_NOT_EMPTY(), IS_HEXSTR()], _id= 'activation_left'), And in your view: jQuery('#activation_left').width(50); You could also attempt to solve the root problem (css) by adding your own custom css that takes preceden

[web2py] IS_TIME() validator behavior with whitespaces surrounding meridiem

2014-07-04 Thread Wes Hall
It appears as though '2pm' and '2 pm' validate differently while '2:00 pm' and '2:00pm' validate the same. In my quick testing, removing all spaces still allows the IS_TIME() validator to pass any tests. Am I missing any international time entry methods where the spaces would be critical or wo

[web2py] DAL - JSON Field type vs. text + filter

2014-03-23 Thread Wes Hall
I just saw the addition of a JSON Field type. Is this safe to use as a (mostly) drop in replacement for text + filter or should I continue to use filtering? I didn't see much of a discussion in -users, and a quick search in -developers didn't show much either. -- Resources: - http://web2py.c

[web2py] 3rd party mail API methodology

2013-08-08 Thread Wes Hall
How do I implement the alternate method site-wide? Is it as simple as matching the Mail() signature? What are the minimum parameters that would need to be in place for it to work site-wide? (Thinking of Auth, specifically) Is this a bad idea? As far as specifics go, I'm looking at the Elastic

[web2py] Quoting in export_to_csv_file() / import_from_csv_file()

2013-07-10 Thread Wes Hall
After using import_from_csv_file(), additional quotes are showing up in the db. Should I be using some different quoting in export_to_csv_file() or is this an inherent problem with specifying filter_out in in the model, or am I completely off the mark? Exporting db = 2.4.6 Importing db = 2.5.1

[web2py] Re: @auth.requires_signature won't authenticate SQLFORM.grid signed paginate URL

2013-05-30 Thread Wes Hall
y > > On Thursday, May 30, 2013 6:44:59 PM UTC-4, Wes Hall wrote: >> >> I need to verify that the right person can get to the grid, but once that >> is established, let the grid handle verification. >> >> Something along the lines of this would be the best acti

[web2py] Re: @auth.requires_signature won't authenticate SQLFORM.grid signed paginate URL

2013-05-30 Thread Wes Hall
ify the > signature to prevent any access to the function at all, you can directly > call the URL.verify() function within the other() function. > > Anthony > > On Thursday, May 30, 2013 2:12:31 AM UTC-4, Wes Hall wrote: >> >> Using MDP's example from here: >>

[web2py] @auth.requires_signature won't authenticate SQLFORM.grid signed paginate URL

2013-05-29 Thread Wes Hall
Using MDP's example from here: https://groups.google.com/d/msg/web2py/VBrm6B6-Pdk/sG_h9Ane8zQJ and the manual's suggestion for digitally signed urls: @auth.requires_membership('admin'): def index() link = URL('other',user_signature=True) #1 return dict(link=link) @auth.requires_signatur

[web2py] Re: external link in menu with target option

2013-01-11 Thread Wes Hall
Along these same lines: response.menu += [ (T('External Sites',), False, A('Web2Py', _href="http://web2py.com/",_target ="_blank"), []), ] Gives the expected result of a new tab/window However, the following loads the link in both the current tab/window as well as the new one. response

[web2py] Re: Limits on controller names?

2012-12-19 Thread Wes Hall
Packing and reinstalling the application solved the problem. Any clues as to what might've happened? On Wednesday, December 19, 2012 4:59:52 PM UTC-5, Wes Hall wrote: > > I was successfully working with a controller 'b.py'. > > I am no longer able to use the i

[web2py] Limits on controller names?

2012-12-19 Thread Wes Hall
I was successfully working with a controller 'b.py'. I am no longer able to use the included editor to edit this controller. Attempting to access the controller results in a never-ending attempt to load. Suspecting the file contents, I renamed the controller and .bak to c.py and c.py.bak (the

[web2py] Re: Login logout links drop down not working on mobile

2012-12-11 Thread Wes Hall
Find anything? On Monday, October 8, 2012 3:03:52 AM UTC-4, lyn2py wrote: > > Per the subject line, I can click to drop down the links but I can't click > on them. > This is on production and using stable. > > May I know how to resolve? Thanks! > --

[web2py] Re: Building a nested query in place

2012-11-30 Thread Wes Hall
re great. > > On Tuesday, November 27, 2012 10:23:13 AM UTC-7, Wes Hall wrote: >> >> Understood, this is a database issue. My expense comment was referring >> to frequently checking the db for changes, not the actual query. >> >> Friendly names should < 10, te

[web2py] Re: Multiple submit buttons using selectable in SQLFORM.grid

2012-11-29 Thread Wes Hall
Any luck with this? On Tuesday, September 4, 2012 3:02:07 AM UTC-4, Johan Börjesson wrote: > > I am using selectable in SQLFORM.grid to create checkboxes and a submit > button, it's working fine. > But I would like to have two submit buttons where each button calls a > different function, depend

[web2py] Re: Building a nested query in place

2012-11-27 Thread Wes Hall
> On Tuesday, 27 November 2012 10:25:32 UTC-6, Wes Hall wrote: >> >> Since I obfuscated the real application, I can't fault this answer. >> However, in the current usage, it doesn't feel like the best solution. >> Teachers are being inserted into the data

[web2py] Re: Building a nested query in place

2012-11-27 Thread Wes Hall
ber 27, 2012 10:53:39 AM UTC-5, Massimo Di Pierro wrote: > > I would suggest that when a user register you check if they have "friendly > sounding" first name and flag it, then search using the flag. > > On Tuesday, 27 November 2012 09:48:48 UTC-6, Wes Hall wrote: >>

[web2py] Building a nested query in place

2012-11-27 Thread Wes Hall
I want to select teachers that have taught for more than one year, are getting paid and have a friendly sounding first name. The friendly sounding names are stored in a table, along with their expected position in the name. Currently I'm using this: teacher_query = db.teachers.years_taught!=0

Re: [web2py] Re: powerTable AttributeError: 'DAL' object has no attribute 'virtual'

2012-10-01 Thread Wes Hall
I have been having the same issue and was able to try trunk just now. The error persists. My working powerTable code on 1.99.3 no longer works on 2.0.9. On Monday, October 1, 2012 1:23:54 PM UTC-4, Massimo Di Pierro wrote: > > Can you please try the trunk version? > > On Sunday, 30 September 201

Re: [web2py] Download file and redirect (or redirect and auto-download file)

2011-11-14 Thread Wes Hall
You're right. In short, I was just looking for the typical, easy web2py method for http-equiv; something similar to response.meta.refresh(). I think if I spend some more time wrapping my head around response, I'll be able to better determine what I should do. In simple terms, I want to issue m

Re: [web2py] Download file and redirect (or redirect and auto-download file)

2011-11-09 Thread Wes Hall
Unless I'm missing something, session.flash() and response.flash() will not load a new page, only flash a message. Am I wrong? If I try to load the thank_you view and then redirect to the download, it doesn't load the page, but goes straight to the download. (a response exits the function, righ

[web2py] Download file and redirect (or redirect and auto-download file)

2011-11-09 Thread Wes Hall
I'm afraid I'm missing something very basic here. When a user clicks a link to download a file, how to start the download after directing to the thank-you page? I can do either, but have not figured out how to do both. Obviously, this won't work, but the desired behavior is something like this.

[web2py] Re: Powertable and DAL count

2011-11-07 Thread Wes Hall
Anthony, Aha, thanks for the wisdom. From the CLI and if I build the table manually, you are correct, it works as expected. It appears as though the powertable plugin has some specific column requirements, so I'm now referencing the fields/columns as such: table.columns = [str(count1),'events.

[web2py] Re: Powertable and DAL count

2011-11-07 Thread Wes Hall
Pat, I have a hard time hanging with you west-coasters some time. Thank you for your assistance. I was able to reference the field directly into the columns with 'COUNT(events.email)', but wasn't finding it when I was in the Virtual class. _extra was the key. def event_list(): > class

[web2py] Powertable and DAL count

2011-10-30 Thread Wes Hall
I am trying to show a grouped count in a powertable. How do I reference the count's storage object? def event_list(): class Virtual(object): @virtualsettings(label='Count') def email_count(self): return ??? # What do I need to reference? report_id = in