[web2py] Re: Singletons Save Memory and Time

2015-05-05 Thread Joe Barnhart
I don't want to cache the entire output of the function. If I do that, the cache will include the data in the table. I just want to save the object that generates the table and apply new data to it for each user / swimmer / whatever. Had I used cache.ram on this table, it would have made Na

[web2py] Re: Singletons Save Memory and Time

2015-05-05 Thread Joe Barnhart
The jQuery Datatables library is very impressive. It handles sorting, filtering, displaying of data in all forms. Its really worth a look at http://datatables.net My application is very data-centric and I use a LOT of tables, so I built some datatable factory methods to help me. On Tuesday,

[web2py] Singletons Save Memory and Time

2015-05-05 Thread Joe Barnhart
I'm doing a lot of web2py programming lately, and much of my time is spent building helper classes that act as "factories" for high-powered web gadgets. i have a class that builds jQuery DataTables, for example, and another that builds "widgets" as defined in my templating system (each of whic

[web2py] Who wants to append collections to html helpers?

2015-05-03 Thread Joe Barnhart
Here's the handiest hack I've come up with in quite awhile. This should go into a "module" so it is compiled once and added to the DIV class: from gluon.html import DIV def extend(self,coll): self._setnode(coll) ret = self.components.extend(coll) self._fixup() return ret DIV.ex

[web2py] Interesting new Python<-->Javascript builder

2015-05-02 Thread Joe Barnhart
Saw this yesterday... https://github.com/timothycrosley/jiphy It translates Python to Javascript and Javascript to Python. I could see it as an enhancement to the {{}} functionality in web2py to help write javascript code in python syntax. C'mon, you know you already think in python -- just

[web2py] Optimize js, css seems to compute minify over and over

2015-04-30 Thread Joe Barnhart
I haven't used response.optimize_js and css very much, but I just enabled them on my test site. As I expected, it took a long time to load my page the first time (around 15 seconds) as web2py concatenated and minimized the files into the temp directory. But strangely enough, the site only work

[web2py] Re: Web2py: Using images in HTML data

2015-04-18 Thread Joe Magaro
Does anyone have a method for this? On Friday, April 17, 2015 at 9:14:59 AM UTC-4, Joe Magaro wrote: > > Thanks Annet: I am aware of web2py URL helpers. I use them inside of my > views. > > However in this case, they wont work for me as the data is stored in a > table and ou

[web2py] Re: Web2py: Using images in HTML data

2015-04-17 Thread Joe Magaro
Thanks Annet: I am aware of web2py URL helpers. I use them inside of my views. However in this case, they wont work for me as the data is stored in a table and output to a web page, I require another method. On Friday, April 17, 2015 at 3:01:17 AM UTC-4, Annet wrote: > > Hi Joe, >

[web2py] Cant install via git repo

2015-04-16 Thread Joe Magaro
Hi, on my web2py install I tried to install some applications via a git repo. I have tried several but keep receiving the error below. Any idea what is causing this? Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted exec ccode in

[web2py] Web2py: Using images in HTML data

2015-04-16 Thread Joe Magaro
Hello, I have an application that uses a rich textbox to insert images into a field saved in a table. So for the image URL, I would have to put "/MySiteName/static/images/image.gif" as an example, then save to the database. I really don't like hardcoding the site name, if I copy the project t

[web2py] Re: IMPORTANT - DROPPING SUPPORT FOR PYTHON 2.5?

2015-03-07 Thread Joe Barnhart
th my site. -- Joe On Saturday, March 7, 2015 at 1:01:50 PM UTC-8, Ron Chatterjee wrote: > > I use the source code version. So it doesn't really matter for me. > > On Saturday, March 7, 2015 at 2:18:17 PM UTC-5, Massimo Di Pierro wrote: >> >> Who is opposed? Why? &

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
Hi Jim -- Please, whatever you do, DO NOT ever try Postgres! You will be ruined for MySql... :-P -- Joe On Friday, March 6, 2015 at 3:00:22 PM UTC-8, Jim S wrote: > > Shoot, I was hoping that information would help you out. Certainly made > drastic improvements in my case.

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Joe Barnhart
Hi Jack -- I found that post and checked, but my web2py (v.2.9.12-stable) did not use urllib to begin with. Too bad, I thought I'd found a workaround! Now I'll have to do some heavy lifting and help Niphlod find the problem... -- Joe On Friday, March 6, 2015 at 6:12:30 PM UTC-8,

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
MySql. It just goes to demonstrate how it's not always the best product that wins the popularity contest. (But then, as a voter in elections here, I'm used to that... ) -- Joe On Friday, March 6, 2015 at 2:47:01 PM UTC-8, Niphlod wrote: > > BTW, you just joined two groups I&#x

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
Hi Jim -- Since I'm just starting with MySql, I'm using the latest and greatest 5.6. The newer 5.7 is still "testing" so I have not tried it. My site needs to be on official versions of stuff. On Friday, March 6, 2015 at 2:15:43 PM UTC-8, Jim S wrote: > > What version of MySQL? We had simila

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Joe Barnhart
any current or previous version of web2py. Honestly I don't know how I got anything done before mercurial! -- Joe On Friday, March 6, 2015 at 12:05:25 PM UTC-8, Niphlod wrote: > > add yourself to the bandwagon and help us see what's going wrong > https://github.com/web2p

[web2py] OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
popular choice instead of MySql! (Apologies in advance to any MySql partisans. I'm sure you are highly offended by my dismissal of your One Chosen Database, but I have to call it as I see it.) -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

[web2py] Weird problems with scheduler on OSX

2015-03-06 Thread Joe Barnhart
problem. (I will miss mercurial, tho.) Any quick suggestions? I'd love to use multiple cores on my website if possible... -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/iss

[web2py] Re: Weird Error Message From Web2py - OSError: [Errno 24] Too many open files ???????

2015-03-03 Thread Joe Barnhart
By strange coincidence, I got the same error tonight, using web2py v.2.9.12-stable on the latest version of pypy (python written in python). In my case, I'm pretty sure it is a file handle leak caused by my code which handles scheduled insertion of files into the database. If pypy were dramat

Re: [web2py] Re: pagination issue redirecting to the current page

2015-01-06 Thread Joe
;s working! The redirect looks like this now: redirect(URL('index', args=[request.vars.page])) So it's working! Thanks again very much! I really appreciate it. On Monday, January 5, 2015 6:37:54 AM UTC+8, Michele Comitini wrote: > > Joe, > > If you stay on page 1,

[web2py] Re: pagination issue redirecting to the current page

2015-01-03 Thread Joe
AX for instance by using > {{=A('Selected', _id = i.id, _onclick="jQuery.get(" +URL('select', args=[ > i.id]) ... > and use jQuery itself to manipulate the css class of the button itself > > > > > Il giorno giovedì 20 novembre 2014 04:59:11

Re: [web2py] session uuid

2015-01-02 Thread Joe
1:00 Michele Comitini > >: >> >>> def product(): >>> if session.uuid != request.args(0): >>>raise HTTP(404) >>> >>> return dict() >>> >>> >>> >>> >>> 2014-12-30 4:46 GMT+01:00 Joe >: >

[web2py] session uuid

2015-01-01 Thread Joe
What I am trying to do is send the user to a "product" page where the URL will be a unique URL which can not be used again to access that page after that session. This is what I did, but it's not working as I can use the same URL from an other browser and I can still get to the "product" page.

[web2py] Re: pagination issue redirecting to the current page

2014-11-21 Thread Joe
Massimo Di Pierro wrote: > > URL('index',args=(2)) will give you page #2. > > > On Monday, 17 November 2014 22:59:16 UTC-6, Joe wrote: >> >> Thanks Cliff, I've been trying to do that but I didn't succeed. I would >> appreciate if you could send an e

[web2py] Re: RSVP: Massimo @ Bay Area web2py meetup (refreshments) -- 12/5/2014, 6:30PM - 9:00PM -- BE THERE!!!

2014-11-21 Thread Joe Barnhart
Has anyone notified the BayPiggies list of our event? Should we? -- Joe On Wednesday, November 5, 2014 11:48:14 PM UTC-8, weheh wrote: > > Hi Bay Area web2py'ers. Get excited! > > *Massimo will attend our very own Bay Area* *web2py meetup* to meet, > greet and present.

[web2py] Re: pagination issue redirecting to the current page

2014-11-19 Thread Joe
Thanks Cliff, I've been trying to do that but I didn't succeed. I would appreciate if you could send an example on how to put the current page info in the request.args dictionary. On Tuesday, November 18, 2014 12:37:09 PM UTC+8, Cliff Kachinske wrote: > > Put information about the current page i

[web2py] Why all traffic forwarded to https and how to stop this ?

2014-11-19 Thread joe black :)
Hi, Just deployed a new web2py using deployment script on Ubuntu.* Problem is all the traffic is forwarded to https. giving certificate error to users.* It was not like this before. How to stop this automatic forward to https? Also where is the routes.py . Is it depreciated ? Then how to achie

[web2py] pagination issue redirecting to the current page

2014-11-17 Thread Joe
I am working on an app where the user can select items by clicking on a button for each item on the index page. It works fine, except after each item selected the user has to be redirected to index and ends up on the top of the first page at item 1. Then the user has to go back each time and try

[web2py] Re: RSVP: Massimo @ Bay Area web2py meetup (refreshments) -- 12/5/2014, 6:30PM - 9:00PM -- BE THERE!!!

2014-11-10 Thread Joe Barnhart
I'll be there with bells on. I also offered to drive Massimo to the event as he usually camps out on the peninsula and doesn't rent a car. -- Joe P.S. I don't have an official presentation but I can show a bit about the commercial web site I'm developing using web2py. -

[web2py] Re: Shopping cart concept without the payment

2014-10-25 Thread Joe
so I can see in the db.images that they are "True" therefore selected. images.idimages.picture_nameimages.selected_pictures5pic5None4pic4None3pic3 None2pic2None1pic1None On Monday, October 20, 2014 9:31:19 AM UTC+8, Joe wrote: > > Hi Dave, > > Thanks so mu

[web2py] Re: Shopping cart concept without the payment

2014-10-22 Thread Joe
. This is where I am stuck: def index(): form = SQLFORM(db.images).process() return dict(form=form) def pictures(): form = SQLFORM(db.chosen).process() return dict(form=form) I'd appreciate any help, thanks again. On Saturday, October 18, 2014 2:01:44 A

[web2py] Shopping cart concept without the payment

2014-10-16 Thread Joe
This is what I am trying to do: I want the user to be able to select images, using a select button under each image. My plan to achieve this is: 1. define a table for all the images and define an other table for the images the user will select. 2. create a function with an SQLFORM to process

[web2py] Simple CSS for hover image to enlarge

2014-10-13 Thread Joe
I have a very simple css (below) to enlarge an image when hover over but it doesn't work when I try to use it with web2py view like this: src="{{=URL('static','images/pic1.jpg')}}. Is there a way to make this work somehow or the only way to do this in web2py is by using java script?

[web2py] mobile-menu nav is not is not working up on tablet

2014-10-07 Thread Joe
I am having a great time using web2py. I am grateful to all of you who created and contributed to this amazing framework. I just created my first app, I am learning as fast as I can! I hope someone can help me with this issue about the mobile navbar. The mobile-menu nav is not appearing in hori

[web2py] Re: mobile and tablet version responisive issues

2014-10-07 Thread Joe
Hi Leonel, thanks very much for your reply! I appreciate it. 1. I removed all my added CSS from the web2py.css, just kept the original, default web2py CSS and the horizontal view on the 7 inch Samsung is still the same, In any case, I have to work on the CSS and try to fix it, I will work it ou

[web2py] mobile and tablet version responisive issues

2014-10-04 Thread Joe
I have 3 issues, all related to the mobile and tablet version of the application: 1. I have placed this: *@media only screen and (min-width: 150px) and (max-width: 1024px)* in the web2py.css file and my app was perfectly responsive offline as I was developing. When I made my browser smaller, i

[web2py] Re: Version 2.9.6 indeed breaks backward compat for some users

2014-09-11 Thread Joe Barnhart
Just set case_sensitive=False and it will work exactly the way you want regardless of the convention chosen. I now set the case on my queries since it seems prudent to do so. After all, I may change from Postgres to MySql or something and I don't want to be surprised. -- Joe On Thu

[web2py] Re: Strange but useful THEAD trick!

2014-09-10 Thread Joe Barnhart
x27;Term')]) But (no surprise) these do not: head = THEAD(['Date','Name','Amount','Term']) # need another wrapper of list head = THEAD([[('Date','Name','Amount','Term')]]) # too many wrappers So y

[web2py] Re: web2py meetup Bay Area

2014-09-10 Thread Joe Barnhart
I'm in! I live in Santa Clara, or as most people know it ... Silicon Valley! On Wednesday, September 10, 2014 12:12:14 PM UTC-7, weheh wrote: > > I've moved back to the Bay Area and was surprised to find there is no > web2py meetup group. Massimo, how did your web2py meetup in San Fran go > ma

[web2py] Re: Strange but useful THEAD trick!

2014-09-10 Thread Joe Barnhart
side a list: > > print THEAD([['a', 'b']]) > > ab > > > Anthony > > On Wednesday, September 10, 2014 3:32:24 AM UTC-4, Joe Barnhart wrote: >> >> I often use the web2py helpers to build my tables on the fly. I've >> always thought it

[web2py] Re: Strange but useful THEAD trick!

2014-09-10 Thread Joe Barnhart
I dunno. If a bug turns out to be useful, does that make it a feature? On Wednesday, September 10, 2014 12:54:11 AM UTC-7, Cliff Kachinske wrote: > > Are you sure that's a feature and not a bug? > > On Wednesday, September 10, 2014 3:32:24 AM UTC-4, Joe Barnhart wrote: >

[web2py] Re: "validate_and_insert" my new best friend

2014-09-10 Thread Joe Barnhart
osen represents fields in strange ways, like the example I gave of dates having 8 digits and no separators. In this case the validator is really helpful to parse the date format for me on the fly. -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Strange but useful THEAD trick!

2014-09-10 Thread Joe Barnhart
ttern works perfectly to wrap its members in TH instead of TD: THEAD( [ ('head1', 'head2', etc...) ] ) So if I create a TUPLE (not a list), wrap it in a LIST, and then hand it to THEAD, it creates TH elements inside the THEAD. Every other construction I've tried retu

[web2py] IS_INT_IN_RANGE() weirdness

2014-09-09 Thread Joe Barnhart
ll fail every time, for all time. Because '1' satisfies the lower limit (min <= val) bur it fails the high limit (value < max). Not a problem if you're looking for it, just seems a weird definition... -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (

[web2py] Re: a proposal for form improvement

2014-09-08 Thread Joe Barnhart
from server-side to client-side forms. -- Joe On Thursday, September 4, 2014 10:56:23 PM UTC-7, Massimo Di Pierro wrote: > > Please find attached a welcome4.zip with contains the following files: > > controllers/default.py > views/layout.html > vides/default/index.html

[web2py] "validate_and_insert" my new best friend

2014-09-06 Thread Joe Barnhart
unno if it is marginally faster or slower than me doing it by hand, but I can tell you its a whole lot more maintainable, and that is the real winner long term. -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - ht

[web2py] Re: web2py list of dictionaries

2014-09-05 Thread Joe Barnhart
ave a second variable "J" point to him too. They're all pointing to exactly the same dictionary David. Anything David picks up or drops is the same everywhere. You just added David to the same list a bunch of times. On Thursday, September 4, 2014 10:03:35 PM UTC-7, trr wrote:

[web2py] Re: Version 2.9.6 indeed breaks backward compat for some users

2014-09-05 Thread Joe Barnhart
me databases which were not forced by web2py? Is that why the devs changed it? If there is some deep underlying flaw in the previous release of web2py, please tell me so I can feel better about this! -- Joe On Thursday, September 4, 2014 11:05:39 PM UTC-7, Massimo Di Pierro wrote: >

[web2py] Re: web2py list of dictionaries

2014-09-03 Thread Joe Barnhart
Or, you could just move the line "d = {}" into the first "while" block. That will get you a new dictionary object for each pass. -- Joe On Wednesday, September 3, 2014 4:45:40 AM UTC-7, trr wrote: > > In controller I create a list of dictionaries from an uploaded exce

[web2py] Version 2.9.6 indeed breaks backward compat for some users

2014-09-03 Thread Joe Barnhart
soapbox = True Version 2.9.6 does indeed make LIKE case-sensitive -- at least for Postgres and perhaps other databases. The change is that case sensitivity now mimics the underlying database that you are using at the moment. So if you're a MySql user you'll probably keep case-insensitive as y

[web2py] Re: web2py 2.9.6 is out!

2014-09-02 Thread Joe Barnhart
So does LIKE default to case-sensitive now? Will it stay that way? https://code.google.com/p/web2py/issues/detail?id=1973 -- Joe On Monday, September 1, 2014 7:08:25 PM UTC-7, Massimo Di Pierro wrote: > > This is a much improved revision. Lots of the changes are internal > re

[web2py] Re: Philosophical help with REST

2014-09-01 Thread Joe Barnhart
at "purer" rest (or even HATEOAS <http://en.wikipedia.org/wiki/HATEOAS>)? If I'm using this to make a table, it has the advantage of allowing each club to be a link that shows you all of the club's data. But it seem harder on the javascript side to build or fill in t

[web2py] Re: bootstrap 3 - if you care help test trunk now

2014-08-29 Thread Joe Barnhart
7;t know which is more "correct" but it does mean I need to change my code in numerous places to accommodate the change in usage. -- Joe On Saturday, August 9, 2014 12:13:38 AM UTC-7, Massimo Di Pierro wrote: > > Bootstrap 3 is in trunk now. Please help us test it. > Also h

[web2py] Philosophical help with REST

2014-08-29 Thread Joe Barnhart
I'm using the restful pattern with my web2py app today, and I find it to be a very powerful concept. I think I'm having a conceptual difficulty, tho, with the different levels at which web2py helpers operate to make my life easier. In one specific case, I have a swimmer record that, along with

[web2py] Re: How do I apply placeholder text to web2py forms?

2014-08-24 Thread Joe Barnhart
If you're using SQLFORM, I did come up with a cute little trick that uses a lambda to add placeholders to a custom formstyle definition. https://groups.google.com/d/msg/web2py/VSr2oLNnozg/jlbbYPaAoiMJ -- Joe On Thursday, June 23, 2011 7:24:44 AM UTC-7, Carl Hunter Roach wrote: > >

[web2py] Re: Total newbie, advice on storing scans

2014-08-24 Thread Joe Barnhart
Everything is searchable with boolean operators, neighborhood, and much more. I can't praise the product enough. Or you can do your own, for the fun. -- Joe On Wednesday, August 20, 2014 1:03:39 PM UTC-7, Gary Cowell wrote: > > Hi > > I'm writing a web app for my home

[web2py] Re: I don't have a gluon forder in my web2py folder

2014-08-22 Thread Joe
> yu're using the binary. not the source code > > On Thursday, August 21, 2014 4:11:34 PM UTC+2, Joe wrote: >> >> I am using windows and when I downloaded web2py I unzipped it and I have >> been using it, it works fine, however, I noticed that between the extra

[web2py] Re: I don't have a gluon forder in my web2py folder

2014-08-21 Thread Joe
this point. Please kindly advise, I appreciate the help very much! (I apologize for posting this same question 3 times, I thought my post wasn't going through. At first I didn't realize that new posts are held for a while) On Monday, August 18, 2014 6:24:18 PM UTC+8, Joe wrote:

[web2py] I don't have a gluon forder in my web2py folder

2014-08-20 Thread Joe
I just noticed that I don't have a gluon folder in the web2py folder. Everything seems to work fine, but as I just watched the tutorial video going through each folder, I realized that I don't actually have a gluon folder. How is this possible? -- Resources: - http://web2py.com - http://web2p

[web2py] gluon folder not in my web2py directory

2014-08-20 Thread Joe
I asked this question before but somehow I don't see my question, maybe I didn't actually post it. I don't seem to have the gluon folder in my web2py folder. All the other folders are there except the gluon folder. However, I have a zip file in the web2py folder named "library". I never opened

[web2py] Re: CSS issue with embedded form

2014-08-14 Thread Joe
, Joe wrote: > > I am just learning web2py and I love it!!! > > I am experimenting with it so I can learn it. > > THE QUESTION: I use my own HTML and CSS. I embedded a form in the HTML > like so" {{=form}} > > The form is displayed fine and works perfectly, however,

[web2py] Re: web2py and anaconda

2014-08-14 Thread Joe Barnhart
My Google-fu turned up two answers http://stackoverflow.com/questions/7124035/in-python-shell-b-letter-does-not-work-what-the http://ubuntuforums.org/showthread.php?t=1963764 My anaconda installation does it too. Have not fixed the .pythonrc yet. -- Joe On Thursday, August 7, 2014 11:29

[web2py] Re: Web2py vs ruby on rails for a startup?

2014-08-14 Thread Joe Barnhart
with test loads. I expect it will easily outperform my existing RoR site. Joe On Saturday, August 9, 2014 11:43:02 PM UTC-7, Suresh Mali wrote: > > > I am trying to zero on web framework for our startup, > requirements > a. Security ( we are working on financial info hence this

[web2py] CSS issue with embedded form

2014-08-14 Thread Joe
I am just learning web2py and I love it!!! I am experimenting with it so I can learn it. THE QUESTION: I use my own HTML and CSS. I embedded a form in the HTML like so" {{=form}} The form is displayed fine and works perfectly, however, it just floath left no matter what I do in the page. I pla

[web2py] Re: web2py vs others. Status of 2014

2014-08-05 Thread Joe Barnhart
and more of my users are on mobile platforms, which fits perfectly with the heavy client approach. Agh! -- Joe On Monday, June 9, 2014 5:01:39 AM UTC-7, Ramos wrote: > > what is the status of the evolution of web2py compared with other, mainly > rails /or django ? > > > wh

[web2py] Re: jquery ajax strange respond on second time

2014-06-01 Thread Joe Barnhart
I did see a warning in the jQuery docs about using async = False with the "deferred" jqXHR object (i.e. when defining the error callback). Here is what they say: >- *async* (default: true) >Type: Boolean >By default, all requests are sent asyn

[web2py] Re: Creating two separate registration forms in Web2py?

2014-06-01 Thread Joe Barnhart
One possibility is to add the extra fields to the auth_user table and then turn them "off" for user registration. I do this for my swimming web site and it works great. In the controller just declare any fields you wish to hide as "db.x.readable=False" and "db.x.writable=False" (where x is you

[web2py] Re: Pypy and psycopg2-cffi?

2014-05-28 Thread Joe Barnhart
pypy than the normal psycopg2 on cpython in all cases except one -- "fetchall" was still faster on psycopg2+cpython. It was not a big difference in speed, however, and lots of benchmarks were improved with pypy. -- Joe On Wednesday, May 28, 2014 1:03:50 PM UTC-7, Niphlod wrote: >

[web2py] Pypy and psycopg2-cffi?

2014-05-28 Thread Joe Barnhart
rence for "exec" instead of compiled code. But I noticed that my web2py projects recently have been putting most of the heavy-hitting stuff in modules, which would definitely be pypy-friendly. So I'm curious if anyone has dabbled with pypy and web2py (and Postgres) recently... -

Re: [web2py] how string_agg for groupby?

2014-05-23 Thread Joe Barnhart
['lsc.id','lsc.code','lsc.name']) -- Joe On Tuesday, May 20, 2014 7:26:24 AM UTC-7, Richard wrote: > > Yes you are right... I just puch as far as I can for this one to touch the > limit... Though the reason was to make use of Row and dot notation to > acc

Re: [web2py] how string_agg for groupby?

2014-05-16 Thread Joe Barnhart
use it not long ago, I was amazed at how simple and direct it was. It really made a messy query into a clean one. -- Joe On Wednesday, May 14, 2014 7:46:20 AM UTC-7, Richard wrote: > > Hello, > > Is there a way to do string_agg() with in web2py for a query that have &g

[web2py] Re: Customize bootstrap 3 forms

2014-05-16 Thread Joe Barnhart
Formstyle can be a callable function, which allows you to do exactly what you want. To add parameters to a formstyle function, you first create your own version of the basic formstyle (as you did with your version of the bootstrap3 form), then "wrap" it in a lambda which presets the new values

[web2py] Re: help with helper!

2014-05-14 Thread Joe Barnhart
I see you're using font-awesome. You need to add "fa" as well as the icon name you want "fa-home". I also recommend you use the URL helper if you ever want the url re-writing features of web2py. My recommendation is: A(I(_class="fa fa-home"),SPAN("Home",_class="menu-item-parent"),_href=URL( '

[web2py] Do we need a "response.files" for footer as well as header?

2014-05-08 Thread Joe Barnhart
ve both header and footer at present. Is there a need to have a new variable which does the same thing, but is defined to be used for scripts in the footer area? Or is it not really important to load static script files with the end of the page instead of the header? -- Joe -- Re

[web2py] Re: Mozilla Web App Security recommendations

2014-05-08 Thread Joe Barnhart
Sadly the links in the article no longer point to any information about web2py. Looks like the python security project got rid of its wiki and all of the information it had (like web2py's score) is now lost. -- Joe On Thursday, May 8, 2014 1:25:11 PM UTC-7, Massimo Di Pierro wrote: >

[web2py] Mozilla Web App Security recommendations

2014-05-08 Thread Joe Barnhart
Anyone see this? https://wiki.mozilla.org/WebAppSec/Secure_Coding_Guidelines >From my quick reading, web2py does pretty well according to the recommendations here... -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou

[web2py] Re: query DAL

2014-04-30 Thread Joe Barnhart
ing it as migrate=False. Then create the view in the database manually to match its definition in web2py and you're set. -- Joe B. On Monday, April 28, 2014 12:30:50 PM UTC-7, Fernando Vieira wrote: > > Guys, I have a problem and can not solve, I'll describe it below > >

[web2py] Re: how to cleanse field value

2014-04-19 Thread Joe Barnhart
or_message def __call__(self, value): if value == self.expression: return (value, None) return (value, translate(self.error_message)) As you can see, a custom error message is initialized during the init() phase and passed back if there is an error during the call

[web2py] Impersonate in Layers...

2014-04-17 Thread Joe Barnhart
ve me the layers I'm looking for. That is: support --> impersonate users managers --> impersonate support, users root --> impersonate all of the above Have I missed something obvious? -- Joe "benevolent dictator" B. -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] Re: Best way to implement SQL select query

2014-04-16 Thread Joe Barnhart
You probably want "belongs" instead of "contains". It's a common mistake (which I make regularly myself). The "contains" function in web2py is to test if strings are contained in a field, i.e. db.mytable.myfield.contains("joe") is like db.mytabl

[web2py] Re: Pyston

2014-04-11 Thread Joe Barnhart
uot;python written in python" but a straightforward JIT to bring it up to at least JVM speed, and maybe better. On Wednesday, April 9, 2014 2:04:34 PM UTC-7, Massimo Di Pierro wrote: > > What did I miss? Where is it? > > On Tuesday, 8 April 2014 21:01:50 UTC-5, Joe Barnhart wrote:

[web2py] Re: Pyston

2014-04-08 Thread Joe Barnhart
Ha! Well now we know Guido's answer to Armin and the gang at PyPy! -- Joe On Thursday, April 3, 2014 11:41:22 AM UTC-7, Massimo Di Pierro wrote: > > This is really important! > > https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation

[web2py] Admin not actually disabled after 5 login attempts?

2014-04-03 Thread Joe Buck
e intended behavior. Is there a way to make sure admin is actually disabled after failed authentication attempts? Thank you, Joe Buck -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

[web2py] New Merchant service -- WePay.com

2014-03-31 Thread Joe Barnhart
These guys look very much like Stripe.com as credit-card merchant service providers -- that is to say, VERY good! Two differences stand out -- WePay can process electronic checks as well as credit cards, an advantage not shared by Stripe. Also, the WePay API is based on OAuth2, which seems lik

[web2py] Tree stuctured layout problem

2014-03-25 Thread Joe Barnhart
't like to be loaded twice. My jQuery DataTables stuff, for instance, complains loudly about being initialized twice. So am I using the tools beyond their capability? Or is this just a minor bug that is easily corrected? -- Joe -- Resources: - http://web2py.com - http://web2py.com/book (Docu

[web2py] Re: janrain and web2py

2014-03-25 Thread Joe Barnhart
To be honest, the price model of Janrain is way too prohibitive. If my site gets popular I'll be spending hundreds on the Janrain service -- it would become my most expensive service besides merchant services (a.k.a. credit card fees)! The free version is limited to 2500 users, which I will b

[web2py] Re: Problem with compute field

2014-03-25 Thread Joe Barnhart
d, not "year". Oops. Datetime.year returns the value of the year. But datetime.date returns a function, not a value, hence my "compute" field got NOTHING. My problem is now solved, and I have the pleasure of marking my own description as the "best" one! Hooray for me! --

[web2py] Re: Problem with

2014-03-24 Thread Joe Barnhart
Huh. Nice descriptive title, huh? Did you know you can't edit the title after the post is created? Even if your mouse slipped up and clicked the submit button too soon? Ah well, live and learn. On Monday, March 24, 2014 1:20:59 PM UTC-7, Joe Barnhart wrote: > > I'm trying to

[web2py] Problem with

2014-03-24 Thread Joe Barnhart
.signature, format="%(name)s", migrate=current.settings.migrate) The table works perfectly except the compute field of "season" is never populated. I know for a fact the lambda is run, because when I had "datetime" imported into the wro

[web2py] Re: Import error for guppy

2014-03-02 Thread Joe Barnhart
t makes a difference, however. I am able to import guppy manually using "import guppy" but I haven't played with it other than that. -- Joe On Thursday, February 20, 2014 8:01:05 PM UTC-8, David Phillips wrote: > > My app uses web2py as a background task (as described in Ch. 4 of t

Re: [web2py] pg8000 driver that comes with web2py 2.8.2 is not supporting JSON field type?

2014-03-01 Thread Joe Barnhart
support a driver like psycopg2 -- but it could support pg8000 since it is all python. It's just good to have an alternative because no driver does it all. -- Joe B. On Tuesday, February 25, 2014 6:55:17 PM UTC-8, Mariano Reingart wrote: > > Hi Horst: > > Sadly there have been a lot

[web2py] Re: Updating a distributed web2py app.

2014-02-19 Thread Joe Barnhart
/community/ -- Joe B. On Wednesday, February 19, 2014 8:21:04 AM UTC-8, Brando wrote: > > I assume this is a dumb question, but here goes.If I distribute my > web2py app what is the best way to push updates to my clients that are > spread out all over the place? > -- Resources: - ht

[web2py] Re: postgres beginner questions: passwords, peer authentication, dev/production

2014-02-19 Thread Joe Barnhart
y well. It also works without any special features of the source code control system (I don't use git but mercurial). -- Joe B. Globals # coding: utf8 from gluon import current from gluon.storage import Storage from gluon.custom_import import track_changes settings = Storage() curren

Re: [web2py] A query too far? Inner join with group by...

2014-02-19 Thread Joe Barnhart
curs, so I can get the rest of the data. See my finished page in my response to Richard and maybe it will make more sense. It's hard to put database stuff into words! https://groups.google.com/d/msg/web2py/iQQ3lm7E9wg/aqUnMhR60s8J Warm regards, Joe B. On Wednesday, February 19, 2014 9:53:28

Re: [web2py] A query too far? Inner join with group by...

2014-02-19 Thread Joe Barnhart
everything* in a new paradigm tend to become so bloated with corner-cases that they lose their way. Our little web2py has such sparse beauty it would be a shame to see it try to turn into "SQL part deux". Thanks for your help and for spending some of your thought-photons on my probl

Re: [web2py] A query too far? Inner join with group by...

2014-02-19 Thread Joe Barnhart
It took some doing, but I managed to get the query into a single "inner join" and with proper indexing it is amazingly fast. I clocked it at about 20ms for a typical query on my data set. I was still able to make the result a proper Rows object and use SQLTABLE to style the output. W

Re: [web2py] A query too far? Inner join with group by...

2014-02-17 Thread Joe Barnhart
elated subquery comes it -- do a select with ORDER BY on time, then choose LIMIT BY 0,1 to get only one row. But that query has to be repeated for every combination of course and event_code. I have about 20 rows to search for a typical competitor and each query above takes around 700 ms.

Re: [web2py] A query too far? Inner join with group by...

2014-02-17 Thread Joe Barnhart
rse -- not just the SPECIFIC combination in the row that matches the "best" time.. That's why I chose a "join" -- it forces the elements to match perfectly. But thanks for the technique. The idea of materializing the Rows and using it in another query bears think

[web2py] A query too far? Inner join with group by...

2014-02-17 Thread Joe Barnhart
Also, what is my fallback if I need to do this query outside of DAL? -- Joe B. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message beca

Re: [web2py] How to start external python script from my web2py controller (Solution needed as soon as possible )

2014-01-31 Thread Joe Barnhart
rocess) and the communication is handled through a shared database. it is both monstrously powerful and simple to use. it is one if the five best features in web2py, IHMO. -- Joe B. On Sunday, January 26, 2014 10:39:09 AM UTC-8, desta wrote: > > This in an interesting approach. > > Wh

<    1   2   3   4   5   6   7   8   9   >