[web2py] Re: How to switch between pg8000 and psycopg2?

2013-08-09 Thread Massimo Di Pierro
I am pretty sure it works with 2.7. On Friday, 9 August 2013 01:45:06 UTC-5, Joe Barnhart wrote: > > OK. I looked at the source and found I can add a parameter to the URL: > > 'postgres:pg8000://web2py:web2py@localhost/mydatabase' > > But the bad news is --- pg8000 doesn't support Python 2.7! (O

[web2py] Re: SQLFORM.grid field_id not persistent when sorting on grid headers

2013-08-09 Thread Massimo Di Pierro
Which web2py version? On Thursday, 8 August 2013 16:27:35 UTC-5, Kyle Flanagan wrote: > > I submitted this as a ticket (1622), but it may be more appropriate to be > addressed here. > > > What steps will reproduce the problem? > 1. Open the attached app (named poc), login using tes...@testme.com

[web2py] Google Cloud SQL

2013-08-09 Thread Felipe Augusto Meirelles
Hi! I'm trying to update to the latest versions of web2py. I use GAE + Google Cloud SQL. On the latest release version I got the error "AttributeError: 'GoogleSQLAdapter' object has no attribute 'cursor'" for every action I try to make on DB. On trunk, its even creates the tables and complain

[web2py] About runtime

2013-08-09 Thread dbtest19
I am using the web2py to customize the poderopedia platform, If anyone has done the same, can you tell me how long it takes to process? (I am just following the steps in the https://github.com/poderopedia/plug-and-play-1.0-RC). Thanks, V -- --- You received this message because you are subs

[web2py] Re: Python 3 compatibility?

2013-08-09 Thread Remco Boerma
Hi, Good thread all in all. I'm eager to start with python3 but if web2py isn't working with it, then why start with p3 in the first place? Since most of my currently important python applications are web2py based. Many other scripts rely on MoinMoin (same story) and for other scripts many ar

[web2py] Re: accounting appliance

2013-08-09 Thread Simon Ashley
You could get a head start by forking this: https://github.com/mdipierro/pacioli -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@google

[web2py] Re: using contains operator with reference types

2013-08-09 Thread Niphlod
ehm... mine was an example. You can include in the select what you want from the animals table On Friday, August 9, 2013 12:36:11 AM UTC+2, dave wrote: > > is there another way to do it, because this replaces my db.zoo.tier field > with the id > > On Thursday, August 8, 2013 1:55:48 PM UTC-7

[web2py] jQuery flip plugin

2013-08-09 Thread Annet
I came across this jQuery plugin: http://lab.smashup.it/flip/ and an example which uses the plugin: http://demo.tutorialzine.com/2010/03/sponsor-wall-flip-jquery-css/demo.php I have been trying to get this to work in web2py unsuccessfully, and wonder whether one of you has succeeded in using th

Re: [web2py] PyCharm 3.0 EAP web2py support!!

2013-08-09 Thread Richard Vézina
Not tested yet... I try and report back. Richard On Thu, Aug 8, 2013 at 4:45 PM, dave wrote: > can you debug? I can set breakpoints but it does not break or allow me to > inspect variables. did you encounter this problem too? > > > On Thursday, August 8, 2013 1:41:12 PM UTC-7, Richard wrote: >

[web2py] Re: Values in request.vars persist/doubled when form submitted after unexpected logout/session deletion

2013-08-09 Thread Lamps902
Sure. The version I'm using is "2.5.1-stable+timestamp.2013.06.06.15.39.19".The function's really long, so I'll try to distill and abstract what's going on to the relevant parts, and change the var names to something more helpful when taken out of their original context: There's a helper functi

Re: [web2py] PyCharm 3.0 EAP web2py support!!

2013-08-09 Thread Charles Levesque
To debug, simply run the application in debug mode and then, set the break point. Works fine for me. Charles Le jeudi 8 août 2013 15:56:50 UTC-4, Richard a écrit : > > Hello, > > http://blog.jetbrains.com/pycharm/2013/06/meet-pycharm-3-0-eap/ > > :) > > Richard > -- --- You received this mes

Re: [web2py] LDAP with username=True can still login with email

2013-08-09 Thread Richard Vézina
Here the patch!! I have not been able to use the IS_NOT_EMAIL() validator from validators.py didn't understand how validators are import in tools.py... NOTE : About my precedent mail... the "auth_table.username.requires = IS_NOT_IN_DB(db, auth_table.username" from the book is not require if the u

[web2py] Alias in query

2013-08-09 Thread Jose
Hi This is a simplification (the select is more complex and involves many left join) suma = tb_lotes.superficie.sum() rows = db(qry).select( ... ... (suma / tb_establecimientos.superficie) * 100, ... left=[...], groupby=... ) if r

[web2py] Multiple authentication forms on one page

2013-08-09 Thread Koen Vanhees
All, I have an application which uses two different authentication methods: through AD and locally. If I put these login methods on two different pages, everything works smoothly, but of course it's kind of annoying to browse to a different page depending on the login method of choice. Theref

[web2py] Re: Alias in query

2013-08-09 Thread Jose
El viernes, 9 de agosto de 2013 12:01:18 UTC-3, Jose escribió: > > Hi > > This is a simplification (the select is more complex and involves many > left join) > > suma = tb_lotes.superficie.sum() > > rows = db(qry).select( > ... > ... > (suma / tb_establecimientos.

[web2py] Re: Multiple authentication forms on one page

2013-08-09 Thread Anthony
Show your controller and view code. On Friday, August 9, 2013 11:09:24 AM UTC-4, Koen Vanhees wrote: > > All, > > I have an application which uses two different authentication methods: > through AD and locally. If I put these login methods on two different > pages, everything works smoothly, bu

[web2py] Re: Values in request.vars persist/doubled when form submitted after unexpected logout/session deletion

2013-08-09 Thread Anthony
Sorry, a bit too complicated to follow easily as is. Could you either simplify further or attach a packed app that demonstrates the problem (and describe the exact workflow to reproduce the problem). Note, I see you are adding hidden _formname and _formkey fields to the form, but it doesn't app

[web2py] Global variable / config to controllers

2013-08-09 Thread mryan
Hi, New to web2py (and python in general) and had a quick question. I am writing a bunch of python web services that connect to a remote web socket. I'd like to treat the IP address of the socket as a global config, which is accessible by all controllers in the app. Is this possible,? and i

[web2py] How to keep database portability?

2013-08-09 Thread Joe Barnhart
I'm currently using Posgres as my database, but I'd like to preserve the portability that web2py gives me to change databases. I find that I need to add all sorts of "idioms" in my database code and I'm running dry when thinking of ways to abstract this and make a layer that allows me to use,

Re: [web2py] Global variable / config to controllers

2013-08-09 Thread Jonathan Lundell
On 9 Aug 2013, at 8:43 AM, mr...@rethinkrobotics.com wrote: > New to web2py (and python in general) and had a quick question. > > I am writing a bunch of python web services that connect to a remote web > socket. I'd like to treat the IP address of the socket as a global config, > which is acce

[web2py] Re: JSON Error in web2py | WolframAlpha Python Binder

2013-08-09 Thread Alan Etkin
There's an issue opened for this here: http://code.google.com/p/web2py/issues/detail?id=1621&start=100 -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web

Re: [web2py] Re: Cool "formstyle" trick w/Python lambda

2013-08-09 Thread Richard Vézina
You are my man Anthony! On Thu, Aug 8, 2013 at 4:04 PM, Anthony wrote: > Nice. I think we should add an argument to Field() that takes a dictionary > of args to pass to the field's widget (or maybe just add **kwargs to > Field() and pass kwargs to the widget). For now, though, if that's all you

Re: [web2py] Global variable / config to controllers

2013-08-09 Thread mryan
Awesome, thank you. On Friday, August 9, 2013 1:03:34 PM UTC-4, Jonathan Lundell wrote: > > On 9 Aug 2013, at 8:43 AM, mr...@rethinkrobotics.com wrote: > > New to web2py (and python in general) and had a quick question. > > I am writing a bunch of python web services that connect to a remote web

[web2py] Re: SQLFORM.grid field_id not persistent when sorting on grid headers

2013-08-09 Thread Kyle Flanagan
Both 2.4.6-stable+timestamp.2013.04.06.17.37.38 and 2.6.0-development+timestamp.2013.08.09.11.04.59 On Friday, August 9, 2013 2:39:49 AM UTC-5, Massimo Di Pierro wrote: > > Which web2py version? > > On Thursday, 8 August 2013 16:27:35 UTC-5, Kyle Flanagan wrote: >> >> I submitted this as a ticket

[web2py] How web2py deals with incoming requests

2013-08-09 Thread Mark Finkelstein
I was wondering, does web2py launch a separate thread for each web2py request to respond? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr.

[web2py] Re: Multiple authentication forms on one page

2013-08-09 Thread Koen Vanhees
This is the test code... View: AD Local {{if authtype == "AD":}} {{form}} {{elif authtype == "Local":}} {{form2}} {{pass}} The controller is quite simple: def test(): authtype = request.vars.get("authtype") or "AD" return dict(authtype=authtype,form=auth(),form2=auth2()) auth an

[web2py] Re: Alias in query

2013-08-09 Thread Joe Barnhart
Just use the variable "suma" as the key in the Row object: r[suma] Don't put quotes around the name -- use the actual variable itself and it will return the string needed to fetch the variable from the Row object. -- Joe On Friday, August 9, 2013 8:01:18 AM UTC-7, Jose wrote: > > Hi > > This

[web2py] Re: Alias in query

2013-08-09 Thread Jose
El viernes, 9 de agosto de 2013 16:11:04 UTC-3, Joe Barnhart escribió: > > Just use the variable "suma" as the key in the Row object: > > r[suma] > > Don't put quotes around the name -- use the actual variable itself and it > will return the string needed to fetch the variable from the Row objec

[web2py] Re: SQLFORM.grid field_id not persistent when sorting on grid headers

2013-08-09 Thread Kyle Flanagan
Fixed by revision https://code.google.com/p/web2py/source/detail?r=64ffb31906d8. Thanks niphlod and mdpierro. On Thursday, August 8, 2013 4:27:35 PM UTC-5, Kyle Flanagan wrote: > > I submitted this as a ticket (1622), but it may be more appropriate to be > addressed here. > > > What steps will

[web2py] Re: How web2py deals with incoming requests

2013-08-09 Thread Niphlod
it doesn't depend on web2py, but on what server is serving the web2py application (that is a normal wsgi app). Web2py ships with rocket as the default webserver (meaning, when you start it with web2py.py you're using rocket to serve the web2py code). Rocket is a threaded webserver, so yes, every

[web2py] Re: How to keep database portability?

2013-08-09 Thread Niphlod
This is a tough point. One thing is saying that your app should run on any relational database supported by web2py (i.e. you can say to your users that they can use whatever db they feel comfortable to use). Unfortunately, you reached a point where you feel compelled to use some features that ar

[web2py] Re: Alias in query

2013-08-09 Thread Anthony
But is not "suma" I want to show, the entire operation "(suma / superficie) > * 100" > percentage = (suma / tb_establecimientos.superficie) * 100 rows = db(qry).select(..., percentage, ...) rows[0][percentage] Or, keeping the code as you have it, you could do: rows[0]['((SUM(lotes.superficie

[web2py] Re: Alias in query

2013-08-09 Thread Jose
El viernes, 9 de agosto de 2013 16:52:23 UTC-3, Anthony escribió: > > > > But is not "suma" I want to show, the entire operation "(suma / >> superficie) * 100" >> > > percentage = (suma / tb_establecimientos.superficie) * 100 > rows = db(qry).select(..., percentage, ...) > rows[0][percentage] >

[web2py] Re: RFC: validator IS_NOT_IN_SET

2013-08-09 Thread Kyle Flanagan
I had to use this today. However, this does not work correctly when the set is empty. We assume that if the set is empty, whatever variable value being tested is not in the set. Here's an updated __call__ function: def __call__(self, value): value, error = IS_IN_SET.__call__(self,

[web2py] Re: How to keep database portability?

2013-08-09 Thread Joe Barnhart
The SQLite desire is really an ease of development issue. I have a co-worker who's doing mainly CSS and HTML design, and he doesn't need 20GB of data on his development platform to do that. In fact, his system has only 128G SSD and having a full Postgres database is going to be a problem for

[web2py] Re: How to keep database portability?

2013-08-09 Thread Niphlod
offtopic1: I don't own a mac but it seems that there are binaries for mac ready (instead of being ) offtopic: the choice to use a setpoint is entirely up to you: the same exact functionality (although a little bit slower, depending on the amount of data) can very well be replicated with a tailor

[web2py] Re: How to keep database portability?

2013-08-09 Thread Joe Barnhart
I need to preserve the database state by keeping the changes to the tables in a consistent state. If I insert a group of records, I need to make sure they all succeed or fail. I can't commit them one at a time in this case. -- Joe On Friday, August 9, 2013 1:55:12 PM UTC-7, Niphlod wrote: >

[web2py] Creating Auth Groups

2013-08-09 Thread Rob Paire
I would like to create security groups for my newly minted web2py app, and so I have been reading the chapter on Access Control; in the section titled *Authorization *it states: "You can create groups, give member

[web2py] Re: Creating Auth Groups

2013-08-09 Thread Joe Barnhart
The appadmin application definitely DOES show the auth_* tables for me. Maybe you didn't cause the tables to be built? You need to put in the auth.define_tables() somewhere in your models to cause web2py to build them. -- Joe On Friday, August 9, 2013 2:19:42 PM UTC-7, Rob Paire wrote: > > I

[web2py] Re: How to keep database portability?

2013-08-09 Thread Niphlod
On Friday, August 9, 2013 11:11:13 PM UTC+2, Joe Barnhart wrote: > > I need to preserve the database state by keeping the changes to the tables > in a consistent state. If I insert a group of records, I need to make sure > they all succeed or fail. I can't commit them one at a time in this case

[web2py] Scheduler Namespace Gotcha

2013-08-09 Thread Limedrop
Hi, I was experiencing some strange results with the scheduler in one particular application. Tasks would successfully execute, but the scheduler_task and scheduler_run records would stick on RUNNING. After some hair pulling I discovered that the app model was using this variable: COMPLETED

[web2py] Re: How to keep database portability?

2013-08-09 Thread Joe Barnhart
The overall transaction looks like this: start the transaction read 10-200 rows into table A read 10-1000 rows into table B read 10-4000 rows into table C (rows depend on ids from A and B inserts) commit If it fails anywhere, I do not want the transaction to succeed. But if there are dupl

[web2py] Passing extra arguments through a SQLFORM submit button?

2013-08-09 Thread hunt graham
Hi all, I have a view that pulls from 2 db tables, 'post' and 'post_commet'. In the db, each comment has a post_id to specify which comment. I display them in the view with a nested loop: {{for post in posts:}} Post: {{=(post.post_content)}} {{_postId = post.id}} {{co

[web2py] Re: How to switch between pg8000 and psycopg2?

2013-08-09 Thread Joe Barnhart
You are correct. I needed to fixup the migration issue when switching between psycopg2 and pg8000. It works fine. Just did a fake=True and back to False and all was good. -- Joe On Friday, August 9, 2013 12:38:47 AM UTC-7, Massimo Di Pierro wrote: > > I am pretty sure it works with 2.7. > >

[web2py] Re: Creating Auth Groups

2013-08-09 Thread Rob Paire
Model has the line: auth.define_tables(username=False, signature=False) I'm running web2py version 2.5.1 over https with Recaptcha all; that works fine. I know the file exist, I can see them with SQLite Database Browser On Friday, August 9, 2013 5:35:39 PM UTC-4, Joe Barnhart wrote: > > The app

[web2py] Re: using contains operator with reference types

2013-08-09 Thread dave
Ok got it thank you very much On Friday, August 9, 2013 3:10:26 AM UTC-7, Niphlod wrote: > > ehm... mine was an example. You can include in the select what you want > from the animals table > > On Friday, August 9, 2013 12:36:11 AM UTC+2, dave wrote: >> >> is there another way to do it, becau

Re: [web2py] PyCharm 3.0 EAP web2py support!!

2013-08-09 Thread dave
Ok it works now On Friday, August 9, 2013 7:41:48 AM UTC-7, Charles Levesque wrote: > > To debug, simply run the application in debug mode and then, set the break > point. Works fine for me. > > Charles > > Le jeudi 8 août 2013 15:56:50 UTC-4, Richard a écrit : >> >> Hello, >> >> http://blog.jetb

[web2py] Re: Force user to reenter password to save auth.profile() changes

2013-08-09 Thread Mark Li
For anyone else wondering how to do this, I decided to add a "password" field and have onvalidation check the password. This link gave me the idea for checking the text password against the encrypted pw: https://groups.google.com/forum/#!msg/web2py/eqbXmseZ6XA/abnGIMevI6wJ On Wednesday, August

[web2py] Re: Curious admin upload behavior: file name changed when uploading to static/css: - becomes _

2013-08-09 Thread Joe Barnhart
I've forgotten why we map dash to underscore myself. I'm in the unfortunate position of having a domain name with a dash in it and I'd kind of a hassle to deal with the mapping. My bitbucket repo has a dash for example but when I clone it I have to remember to change the name of the dir under