[web2py] SQLFORM(separator=': ') in trunk ... thanks !!!

2011-07-28 Thread David Marko
I just noticed a new update in trunk with text < SQLFORM(separator=': '), thanks Anthony> If this means that I can remove/change default collon in field label names on form, thats great !!! David

[web2py] Re: Web2py anyserver.py with FAPWS

2011-07-28 Thread Massimo Di Pierro
Try this again. At the second ticket, do not click on the link. Locate the admin/errors/ticket# file and mail it to me. On Jul 28, 12:40 am, tejus pratap wrote: > I replaced evwsgi.start(*address[0])  with > evwsgi.start(address[0],str(address[1])), then when I tried to run > web2py I got the err

[web2py] Re: web2py/python question

2011-07-28 Thread Massimo Di Pierro
What is the field type? None is NULL in SQL. This is an SQL issue. On Jul 28, 1:17 am, Kenneth Lundström wrote: > Hello, > > is it so that if I query a table and ask to get all rows where a fields > value is != True then all "None" rows are also exluded, only "False" > rows are included? > > Kenn

[web2py] Re: SQLFORM(separator=': ') in trunk ... thanks !!!

2011-07-28 Thread Massimo Di Pierro
yes. Thanks to Anthony! On Jul 28, 2:00 am, David Marko wrote: > I just noticed a new update in trunk with text < SQLFORM(separator=': '), > thanks Anthony> If this means that I can remove/change default collon > in field label names on form, thats great !!! > > David

Re: [web2py] Re: web2py/python question

2011-07-28 Thread Kenneth Lundström
Boolean and MySQL. Kenneth What is the field type? None is NULL in SQL. This is an SQL issue. On Jul 28, 1:17 am, Kenneth Lundström wrote: Hello, is it so that if I query a table and ask to get all rows where a fields value is != True then all "None" rows are also exluded, only "False" rows

[web2py] Re: SQLFORM(separator=': ') in trunk ... thanks !!!

2011-07-28 Thread David Marko
Sure !!! I really like that he, in most his answers here, references web2py book with link. Very useful

[web2py] Re: The web2py grid/crud plugin you've always dreamed about!

2011-07-28 Thread niknok
I observed a curious behavior when scrolling inside a modal window: when you reach the top (or bottom) of the modal, your main window also scrolls up(or down) as well. Very nice. Kudos to Bruno! +1 for plans to make this part of web2py/contrib On Jul 26, 6:15 am, Bruno Rocha wrote: > BTW: > You

Re: [web2py] Re: Problems with online book?

2011-07-28 Thread Kenneth Lundström
Book is giving tickets again. Kenneth I apologize. The server run out of disk space. Fortunately the database did not get corrupted. I did a lot of cleanup and now everything should be up and running as usual. Massimo On Jul 26, 2:34 pm, cjrh wrote: Book is working again.

[web2py] crud.search results

2011-07-28 Thread andrej burja
hi crud.search returns form and rows 1. is it possible to set that rows object (result of search) contains all data from table, not just fields, that are checked in search form 2. after doing search, is it possible to display just a result (rows), without form so the result of searching for cour

Re: [web2py] Any LDAP auth users out there?

2011-07-28 Thread nils
Hi, Have your tried wireshark or tcpdump ? Regards, Nils On Thu, Jul 28, 2011 at 4:06 AM, Ismael Serratos wrote: > So how do you know it's not working? Do you get any error? or just you can't > login? > > On Wed, Jul 27, 2011 at 8:39 PM, Brian M wrote: >> >> Hmm not certain server is on 10.0.

[web2py] DAL db(db.table.id>1).select() diferent from db.select(db.table.id>1)

2011-07-28 Thread António Ramos
hello why db(db.table.id>1).select() is diferent from db.select(db.table.id>1) the first returns what i want, the second returns all thank you António

[web2py] Re: DAL db(db.table.id>1).select() diferent from db.select(db.table.id>1)

2011-07-28 Thread António Ramos
correction the first returns what i want and the second returns all records but they are empty Em 28 de julho de 2011 13:11, António Ramos escreveu: > hello > > why > db(db.table.id>1).select() is diferent from db.select(db.table.id>1) > > the first returns what i want, the second returns all

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-28 Thread Ross Peoples
The end result of the discussion was to give the developers a way to detect the devices using request.user_agent() to get info from the user agent string, and then the developer can do whatever they want with that information, so the creating of mobile and desktop sites is still completely up t

[web2py] Re: Introducing Grafpad!

2011-07-28 Thread Ross Peoples
Very cool!

Re: [web2py] Re: DAL db(db.table.id>1).select() diferent from db.select(db.table.id>1)

2011-07-28 Thread Miguel Lopes
The correct syntax is: db(query).select( fields_to_include ) You can find the details at: http://web2py.com/book/default/chapter/06#Query,-Set,-Rows as for db.select(db.table.id>1) I would expect it to create a ticket due to a KeyError since db as no select method. 2011/7/28 António Ramos > c

[web2py] Re: Introducing Grafpad!

2011-07-28 Thread Will
This is SO COOL :) By the way, if you go to grafpad.com, then click on your logo , you get an error: "Server Error! Sorry, there was an error with our server. Please continue to our homepage. "( homepage is a link) and clicking the link gets you to a 404 error ( that you drew with grafpag i guess

Re: [web2py] Re: DAL db(db.table.id>1).select() diferent from db.select(db.table.id>1)

2011-07-28 Thread António Ramos
Ok, my mistake! 2011/7/28 Miguel Lopes > The correct syntax is: > > db(query).select( fields_to_include ) > You can find the details at: > http://web2py.com/book/default/chapter/06#Query,-Set,-Rows > > as for db.select(db.table.id>1) I would expect it to create a ticket due > to a KeyError sin

[web2py] return record from a query only shows field from one table

2011-07-28 Thread António Ramos
this db(db.requests.product==*db.products.id*==3).select() returns all field from *product* table only this db(db.products.id==*db.requests.product*==3).select() returns all field from *requests* table only What is the logic? and if i want all record from both tables? thank you António

Re: [web2py] return record from a query only shows field from one table

2011-07-28 Thread Miguel Lopes
The DAL is not SQL, it has a diferent logic. What are you trying to achieve? 2011/7/28 António Ramos > this > db(db.requests.product==*db.products.id*==3).select() > > returns all field from *product* table only > > this > db(db.products.id==*db.requests.product*==3).select() > > returns all

[web2py] jqgrid widget with no table source

2011-07-28 Thread xenebros
Dear friends, I would like to know if is possible to use the jqgrid widget with a data source that wouldn't be a table or a set of tables. I would like to know if I could use it with a json webservice, for example. I know its possible to use the Javascript version of the control with such type of

Re: [web2py] return record from a query only shows field from one table

2011-07-28 Thread António Ramos
i want to select record from 2 tables. I have table requests that have a column product. This column is only the id of the product to know the meaning of the id i have to connect the 2 tables to know the product.description thank you 2011/7/28 Miguel Lopes > The DAL is not SQL, it has a dife

Re: [web2py] return record from a query only shows field from one table

2011-07-28 Thread Miguel Lopes
Ok. One way is to use the represent attribute of db.requests.product field. You can setup this in models after the table definition with: db.requests.product.represent = lambda id: db.product(id).description id is a parameter to lambda which takes the value of the current field value (for product

[web2py] Re: return record from a query only shows field from one table

2011-07-28 Thread Cliff
Antonio, check out these references: http://www.web2py.com/book/default/chapter/06#Logical-Operators http://www.web2py.com/book/default/chapter/06#One-to-Many-Relation http://www.web2py.com/book/default/chapter/06#Many-to-Many Assuming 'db.requests.product' is a foreign key to your products table

Re: [web2py] jqgrid widget with no table source

2011-07-28 Thread Bruno Rocha
I dont know about jQgrid, but in PowerGrid[1] you can pass any callback function which returns JSON. http://labs.blouweb.com/PowerGrid On Thu, Jul 28, 2011 at 4:27 AM, xenebros wrote: > Dear friends, > > I would like to know if is possible to use the jqgrid widget with a > data source that wo

[web2py] Re: Rocket support IPv6

2011-07-28 Thread Timothy Farrell
Rocket doesn't currently support IPv6. As I understand adding support would not be difficult. If I add it in, can you help me test it? Thanks, -tim On Jul 26, 11:34 pm, Rahul wrote: > Hi Tim, All, >         Does Rocket support IPv6? If not, can we expect this to be > added to its feature set a

[web2py] Re: web2py/python question

2011-07-28 Thread Cliff
Set the default value for your boolean column. That way you won't have any NULL values in there and you can select on True or False. If you don't like that solution, try (db.mytable.boolean==None) | (db.mytable.boolean==False) in your where clause. If this conditions is ANDed with other conditio

Re: [web2py] Re: How to debug HTTP 500 error on GAE?

2011-07-28 Thread Wikus van de Merwe
I think you mean the default logging level set to DEBUG as we once discussed here: https://groups.google.com/forum/#!msg/web2py/N2O7WrPJdAE/trGuTFU9cssJ But here we have quite opposite problem, it's not that too much goes to the log but rather that errors were not logged.

[web2py] Re: return record from a query only shows field from one table

2011-07-28 Thread Anthony
If you're just fetching a single request at a time, you can also do a recursive select (see http://web2py.com/book/default/chapter/06#Recursive-selects): request = db(db.requests.id==3).select().first() description = request.product.description This is inefficient for multiple records (requ

[web2py] I keep getting "Invalid Circular Reference" using Project Wizard!

2011-07-28 Thread Rufus
I am trying to create a very straightforward database of about 5 tables (for now) but when I try to use the wizard, I always get errors. A trimmed down version follows: table employee first_name last_name picture upload table driver employee_id employee scan_tag table vehicle

Re: [web2py] Re: How to debug HTTP 500 error on GAE?

2011-07-28 Thread Jonathan Lundell
On Jul 28, 2011, at 7:03 AM, Wikus van de Merwe wrote: > I think you mean the default logging level set to DEBUG as we once discussed > here: > https://groups.google.com/forum/#!msg/web2py/N2O7WrPJdAE/trGuTFU9cssJ > > But here we have quite opposite problem, it's not that too much goes to the >

[web2py] left outer join with 5 tables

2011-07-28 Thread António Ramos
hello i have table requests,products,clients,auth_user and comments all tables have related records except comments this table is related with requests and may be empty for a request how to do a left join between these 5 tables? i want to select records between requests,products,clients,aut

[web2py] Re: Postgres quoted identifiers

2011-07-28 Thread Álvaro J . Iradier
Couldn't it be implemented by calling a engine-dependent method like sql_quote(name), which in other engines would by default return the unquoted string, but return the quoted name in mysql and postgres? Greets. On 27 jul, 22:16, Massimo Di Pierro wrote: > Yes. The dal was rewritten to allow thi

[web2py] Re: I keep getting "Invalid Circular Reference" using Project Wizard!

2011-07-28 Thread pbreit
I think field name "type" could be a problem.

Re: [web2py] Re: How to debug HTTP 500 error on GAE?

2011-07-28 Thread Wikus van de Merwe
I've deleted the logging.conf file.

[web2py] Re: return record from a query only shows field from one table

2011-07-28 Thread pbreit
What was the final answer on creating compound queries like this: db(db.requests.product==db.products.id)(db.products.id==3).select() Is that acceptable or advisable? Or is the & way preferred? The & way has the benefit of being splittable across lines? Also, I think Field('product', db.product

[web2py] send email "on create" a record

2011-07-28 Thread António Ramos
hello, what is the best way to add an event like "on create" on a table model? i want to send an email every time a record is create on a table. thank you António

[web2py] Re: I keep getting "Invalid Circular Reference" using Project Wizard!

2011-07-28 Thread Anthony
On Thursday, July 28, 2011 11:53:47 AM UTC-4, pbreit wrote: > > I think field name "type" could be a problem. I'm not sure -- I think the wizard will end up changing that to 'f_type' (it adds 'f_' to field names and 't_' to table names). Anthony

[web2py] self reference and inheritance

2011-07-28 Thread ee...@seccuris.com
Hey I have a db table that has a self referencing field. I need to create an audit table that inherits this table. In this table I also set primarykey so that web2py does not create it's default id. Attempting to do this with the current dal.py results in a splitting error on line 523: rtablename,

[web2py] Re: I keep getting "Invalid Circular Reference" using Project Wizard!

2011-07-28 Thread Rufus
I'll prefix all my field names in the wizard to avoid that keyword problem and see what happens. On Jul 28, 12:25 pm, Anthony wrote: > On Thursday, July 28, 2011 11:53:47 AM UTC-4, pbreit wrote: > > > I think field name "type" could be a problem. > > I'm not sure -- I think the wizard will end up

[web2py] App-specific routes using the new router syntax

2011-07-28 Thread Wikus van de Merwe
I want to use app-specific routes to make my application more portable. Let's assume that there is no "web2py/routes.py" file and my application name is "init". Now I created the "routes.py" file in "web2py/applications/init/" directory and defined my simple router there: my_router = dict( con

Re: [web2py] send email "on create" a record

2011-07-28 Thread Bruno Rocha
If you are using SQLFORM or FORM: if form.accepts(...): #mail.send(...) if you are using crud: crud.settings.create_onaccept = lambda form: mail.send(...) If you need to do that at database level, you will need to look at triggers or create a kind of daemon to watch tables 2011/7/28 Antón

[web2py] Re: SQLFORM(separator=': ') in trunk ... thanks !!!

2011-07-28 Thread Anthony
Yes, to remove the default colon, just do separator=False or separator=''. You can also change the separator to something other than a colon, and it can even be an HTML helper instead of a string (e.g., separator=IMG(_src=URL('static','img/my_label_separator.png')) ). Anthony On Thursday, Jul

[web2py] Re: App-specific routes using the new router syntax

2011-07-28 Thread pbreit
I have this in web2py/routes.py and never see /init or /init/default: routers = dict( BASE = dict( default_application = 'init', map_static=True, ), )

[web2py] Re: return record from a query only shows field from one table

2011-07-28 Thread Cliff
I just do what the book says and it works; so I use the binary and operator between terms. Also you can split it across lines. Since I use descriptive (meaning too long) table and field names, it's helpful to be able to split. On Jul 28, 12:02 pm, pbreit wrote: > What was the final answer on cr

[web2py] one of my web2py sites has slowed to a crawl

2011-07-28 Thread Andrew Thompson
I have 9 'apps' in my web2py install(including welcome & examples). I noticed this morning that one of them is very slow to access. The pages and jquerys take 2-5 seconds to load. The other apps seem to be fine, but the admin app might be tad slow today. I have restarted web2py and the other h

Re: [web2py] App-specific routes using the new router syntax

2011-07-28 Thread Jonathan Lundell
On Jul 28, 2011, at 9:30 AM, Wikus van de Merwe wrote: > I want to use app-specific routes to make my application more portable. Let's > assume that there > is no "web2py/routes.py" file and my application name is "init". Now I > created the "routes.py" file > in "web2py/applications/init/" dire

[web2py] MENUS ACL?

2011-07-28 Thread António Ramos
hello can i restrict the menu.py items according to the user group? thank you António

Re: [web2py] App-specific routes using the new router syntax

2011-07-28 Thread Wikus van de Merwe
Hmmm... So this means that app-specific routes are not so useful as I thought. I thought I would be able to get away without the "web2py/routes.py" having all rules defined per application. In other words, I was expecting the default_router to be the default when there is no "web2py/routes.py".

[web2py] Re: one of my web2py sites has slowed to a crawl

2011-07-28 Thread pbreit
It seems like that would be a code issue. Is there anything in your models or controllers that looks suspicious?

Re: [web2py] Re: web2py/python question

2011-07-28 Thread Kenneth Lundström
Default value could be a good solution, but I don't understand how I have never before run into this. Can't remember how many times I have used !=True to find all none True records. I have chosen not to use ==False as I know that default value is None for boolean. But I guess not so often has I

Re: [web2py] App-specific routes using the new router syntax

2011-07-28 Thread Jonathan Lundell
On Jul 28, 2011, at 10:57 AM, Wikus van de Merwe wrote: > Hmmm... So this means that app-specific routes are not so useful as I > thought. I thought I would be able > to get away without the "web2py/routes.py" having all rules defined per > application. In other words, I was > expecting the defa

Re: [web2py] MENUS ACL?

2011-07-28 Thread Kenneth Lundström
> can i restrict the menu.py items according to the user group? Definitly, I do it like this: response.menu = []#[(T('Frontpage'), False, URL('default', 'index'), []),] if (auth.has_membership('admin')): response.menu += [(T('Settings'), False, URL('default', 'settings'), []),] Kenn

Re: [web2py] Re: I keep getting "Invalid Circular Reference" using Project Wizard!

2011-07-28 Thread Kenneth Lundström
It should definitly not help that you Rufus prefix all fields by hand as web2pys wizard already does that automatically. But it could be that the wizard does not understand to prefix a reserved word. Maybe it helps to prefix by hand. But then your fields are problaly prefixed twice. Kenneth

Re: [web2py] Re: one of my web2py sites has slowed to a crawl

2011-07-28 Thread Andrew Thompson
On 7/28/2011 1:59 PM, pbreit wrote: It seems like that would be a code issue. Is there anything in your models or controllers that looks suspicious? This was my first project in python, so I am sure most of it looks suspicious. Only one of the app/controller/*.py files has been touched this

Re: [web2py] left outer join with 5 tables

2011-07-28 Thread Richard Vézina
Send your app if you don't matter, I will try to write your query... But you may be able to do it by reading the book about Left outer join : http://www.web2py.com/book/default/chapter/06?search=left+join#Left-Outer-Join Ex.: rows=db().select( db.person.ALL, db.dog.ALL, left=db.

Re: [web2py] Re: one of my web2py sites has slowed to a crawl

2011-07-28 Thread Richard Vézina
Python profiler : http://docs.python.org/library/profile.html You need to boot your app and call your function with the profiler and you will have detail of time for all the task and subtask that your function invoque... Richard On Thu, Jul 28, 2011 at 2:29 PM, Andrew Thompson wrote: > On 7/28

Re: [web2py] Re: one of my web2py sites has slowed to a crawl

2011-07-28 Thread Anthony
On Thursday, July 28, 2011 2:29:46 PM UTC-4, Tobarja wrote: > > This was my first project in python, so I am sure most of it looks > suspicious. Only one of the app/controller/*.py files has been touched > this year, back in March. > > I use this app once a month. It was fine last month. > > I

[web2py] Re: Introducing Grafpad!

2011-07-28 Thread mikech
Very nice!

Re: [web2py] Introducing Grafpad!

2011-07-28 Thread Michele Comitini
Charles, That is excellent! I think that using pyjamas was a great choice of yours! I also use it and I suggest it to anyone here that needs complex applications since web2py supports it very well. mic 2011/7/28 Charles Law : > Hi everyone, > > My friend and I have been using Pyjamas and web2

Re: [web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-28 Thread Kenneth Lundström
I find it unfortunate that it was never implemented. Would it be possible to get a web2pyslice of how to do something like what was the orginal idea? Kenneth The end result of the discussion was to give the developers a way to detect the devices using request.user_agent() to get info from t

Re: [web2py] Particular Conditional Fields in Forms case

2011-07-28 Thread Anthony
I'm not sure I understand exactly what you need and don't have time to check your app, but does this help at all: http://web2py.com/book/default/chapter/10#Conditional-Fields-in-Forms? Anthony On Thursday, July 28, 2011 5:49:35 PM UTC-4, Richard wrote: > Hello, > > I know it's not a web2py q

Re: [web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-28 Thread Anthony
On Thursday, July 28, 2011 6:06:43 PM UTC-4, Kenneth wrote: > > I find it unfortunate that it was never implemented. > > Would it be possible to get a web2pyslice of how to do something like > what was the orginal idea? > The mobile device detector has been implemented (in trunk). I don't think

[web2py] How to set escape to False in response.write

2011-07-28 Thread Tushar Chandra
Hi, In the db, i have html code stored in a field. If i want to display it in the views, i have to write : response.write(variable,escape=False) Is it possible to use it in this manner by setting a default somewhere : {{=variable}} Thanx!

[web2py] Re: How to set escape to False in response.write

2011-07-28 Thread Anthony
On Thursday, July 28, 2011 5:39:32 PM UTC-4, Tushar Chandra wrote: > > Hi, > In the db, i have html code stored in a field. If i want to display it > in the views, i have to write : response.write(variable,escape=False) > Is it possible to use it in this manner by setting a default some

Re: [web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-28 Thread pbreit
It was just browser sniffing to set an "is_mobile" variable.

Re: [web2py] App-specific routes using the new router syntax

2011-07-28 Thread pbreit
At a basic level, I agree that 1) app routing should be controlled at the app level and 2) routes.py should be "on" by default. But I think there are some complexities such as what to do when upgrading web2py (overwrite and edited routes file?).

Re: [web2py] Re: web2py/python question

2011-07-28 Thread pbreit
Is it possible that you have the string "None" in the DB?

Re: [web2py] Any LDAP auth users out there?

2011-07-28 Thread Brian M
Web2py always says invalid login. Running the same steps in plain python gives an exception saying the user lookup cannot be performed without a valid binding which would mean it is not accepting the username and password provided. But again the exact same code works fine from the other subnet.

[web2py] Re: Introducing Grafpad!

2011-07-28 Thread Charles Law
Thanks everyone! My friend and I will be looking into all those bugs and getting them fixed over the next couple days. We really appreciate the feedback and bug reports. Keep it coming! On Jul 28, 5:41 pm, Michele Comitini wrote: > Charles, > > That is excellent!  I think that using pyjamas wa

[web2py] Re: Ubuntu pip install web2py in virtualenv

2011-07-28 Thread flebber
On Jul 27, 11:45 pm, Johann Spies wrote: > On 27 July 2011 14:08, flebber wrote: > > > I installed web2py into a virtualenv in my ubuntu install. When > > reading the book it states to start web2py with "python web2py.py -S > > welcome" however I don't appear to have web2py in my directory. > >

Re: [web2py] Any LDAP auth users out there?

2011-07-28 Thread Ismael Serratos
Well as you tell may be is because you are trying to get users from another domain, different IP mean different domains, so users aren't the same, have you tried to login with an acoount from 10.0.1.x?? I mean, not the one you use in .0.0.x? On Thu, Jul 28, 2011 at 6:06 PM, Brian M wrote: > Web2

Re: [web2py] send email "on create" a record

2011-07-28 Thread nick name
I have written a simple "audit" system for tables that patches the dal. You can do something similar to send an email on record creation. See this thread: https://groups.google.com/d/msg/web2py/jKpUVyvNHeE/oufbLz_n1GEJ - which did not receive any response so far.

[web2py] Re: Rocket support IPv6

2011-07-28 Thread Rahul
Yes ofcourse I can help test it, but that may take some time as I would be deploying a new web2py project on an IPV6 site late this year. Cheers Rahul On Jul 28, 6:46 pm, Timothy Farrell wrote: > Rocket doesn't currently support IPv6.  As I understand adding support > would not be difficul

[web2py] Help with manual upload

2011-07-28 Thread nptaylo
I'm integrating plupload into web2py but having issues getting the manual upload to work with the store method. I have the filename of the original file in request.vars.name and the file stream data in request.vars.file I've tried these options and have no luck: db.images.insert(file=db.images.f

[web2py] Re: I keep getting "Invalid Circular Reference" using Project Wizard!

2011-07-28 Thread Rufus
Yeah, I know the fields would be prefixed twice. It was just an experiment to ensure any field names I chose didn't correspond to keywords. It worked fine when I did that, so I may have used "type" as was suggested here. I went through so many iterations I wasn't exactly sure which I had tried.

[web2py] Re: export data to OOO and Excel

2011-07-28 Thread Vineet
I assessed both the libraries for exporting data to excel. "python-excel" is far better in terms of features. "tablib" doesn't have any feature for formatting of cells (such as fore/back color, font, border, etc.) Syntax of python-excel is more human-readable (especially the "easysf" class in it).

[web2py] Re: Relationship help

2011-07-28 Thread Plumo
haha, the subject line could be misunderstood as something more personal...

[web2py] Re: Relationship help

2011-07-28 Thread Web2Py Freak
Yea am using web2py group to fix things with my girlfriend using python... LOL

[web2py] Speed Question

2011-07-28 Thread Web2Py Freak
the speed of my website when am trying any view is fast , is it going to be in the same speed when its online ???