[web2py] Re: message application is compiled and cannot be installed

2011-12-01 Thread Nik Go
Yes! Really weird. I created a ticket: http://code.google.com/p/web2py/issues/detail?id=544 On Thursday, December 1, 2011, Massimo Di Pierro wrote: It gets compiled without you clicking the button? On Nov 30, 8:44 pm, Nik Go nikolai...@gmail.com javascript:; wrote: This is a trifle

Re: [web2py] Say hello to i-Track

2011-12-01 Thread chandrakant kumar
Julio, I have been looking for you since reading techfuel.

[web2py] Re: Decimal vs float

2011-12-01 Thread pbreit
Examples. shipping_amount and start_price both decimals. if form.vars.shipping_amount (form.vars.start_price * 0.2): TypeError: unsupported operand type(s) for *: 'Decimal' and 'float' drops is integer, price_change, start_price are decimals. if ((form.vars.drops * form.vars.price_change)

[web2py] Appliances give Invalid Function error

2011-12-01 Thread lyn2py
I downloaded the appliances from http://web2py.com/appliances/ And I use the installer to install the appliance. When I open the appliance, for example kpax, it says Invalid Function (default/kpax) I'm on the latest stable build. How can I get the appliance to work? Thanks!

[web2py] Re: Decimal vs float

2011-12-01 Thread pbreit
Also. I think this is a Python thing, not Web2py. I'm at a loss for what data type I should use for currencies. I wasn't expecting to run into these type problems (I'm a relative newbie!). if form.vars.shipping_amount (form.vars.start_price * Decimal(0.2)): File

[web2py] Re: Decimal vs float

2011-12-01 Thread pbreit
A version gotcha. This is OK on 2.7 but errors on 2.6: from decimal import * Decimal(1.0) Decimal('1') from decimal import * Decimal(1.0) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/decimal.py, line 649, in __new__ First convert the float

[web2py] Re: Help with socket timeout error

2011-12-01 Thread pbreit
Sometimes this happens with a silly error in a view such as a missing {{pass}} or a missing { or }.

[web2py] Re: Best practices: When to use classes

2011-12-01 Thread pbreit
I wouldn't worry about classes at this point. You don't need to use them at all in Web2py.

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Vidul Petrov
Nice project, thank you. Do you intend to create plugin system for it (like Trac plugins)? On Dec 1, 8:38 am, Julio Schwarzbeck ju...@techfuel.net wrote: Folks, I've just released i-Trac i-Track is a simple issue/bug tracking system developed in web2py, it is Open Source Software released

[web2py] Re: Say hello to i-Track

2011-12-01 Thread stefaan
An impressive piece of work :) I did spot a buglet though: the blue links on top of the contact form at http://demo.i-track.org/itrack_demo/default/contact_admin trigger an invalid function error if one is not logged in. Best regards, Stefaan.

Re: [web2py] Say hello to i-Track

2011-12-01 Thread Martín Mulone
Very nice julio. Is the trac in web2py. 2011/12/1 Julio Schwarzbeck ju...@techfuel.net Folks, I've just released i-Trac i-Track is a simple issue/bug tracking system developed in web2py, it is Open Source Software released under the Simplified BSD License, the site is live at:

Re: [web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Martín Mulone
Another logo contest is comming?... :) 2011/12/1 Massimo Di Pierro massimo.dipie...@gmail.com I do not like names that have google search conflicts. Others like that because their search results go up. We had a different name and I was threatened to be sued. I spend $500 to trademark web2py.

[web2py] uwsgi decorators and web2py

2011-12-01 Thread Francisco Costa
Hi, I'm using web2py + nginx + uwsgi I have a function where I get the users database and then I email them one by one. But when I run this function the page hangs for a few seconds and just loads after all those emails been sent. I was wondering if this problem is possible to solve with the

[web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread lyn2py
I think web2py has established itself (it's been some years already). I think what's more important is the identity of web2py (logo, website etc) needs to be more consistent than now. There's an old logo on here, and another logo on the website, and a new logo coming up (Batman? in Bruno's

[web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Alan Etkin
I am not sure of the benefits of changing the brand image identity with much frequence. I think that part of the sucess of a framework like django (meaning that it is so popular) is that graphically it has a real fine work and It has preserved a very strong image identity (color, tipography). The

[web2py] Re: Best practices: When to use classes

2011-12-01 Thread Alan Etkin
Martin Mulone has made a great work documenting new web2py features and presents some tricks on using class oriented web2py: His work has not been translated to english yet (it is in spanish): http://www.slideshare.net/martinpm/web2py-pensando-en-grande-9448110 On Dec 1, 6:05 am, pbreit

Re: [web2py] Re: Fwd: How disable date widget?

2011-12-01 Thread Vinicius Assef
Where do I open it? On Thu, Dec 1, 2011 at 2:57 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I would consider this an improvement. Please open a ticket. On Nov 30, 9:46 am, Vinicius Assef vinicius...@gmail.com wrote: On Tue, Nov 29, 2011 at 1:39 PM, Massimo Di Pierro

Re: [web2py] How disable date widget?

2011-12-01 Thread Nik Go
You can do it here: http://code.google.com/p/web2py/issues/entry On Thursday, December 1, 2011, Vinicius Assef wrote: Where do I open it? On Thu, Dec 1, 2011 at 2:57 AM, Massimo Di Pierro massimo.dipie...@gmail.com javascript:; wrote: I would consider this an improvement. Please open a

Re: [web2py] Re: Fwd: How disable date widget?

2011-12-01 Thread Massimiliano Belletti
http://code.google.com/p/web2py/issues/list Massimiliano Il giorno 01/dic/2011, alle ore 13:36, Vinicius Assef vinicius...@gmail.com ha scritto: Where do I open it? On Thu, Dec 1, 2011 at 2:57 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I would consider this an

[web2py] Re: How to get the only the value of the Sum in a sum Query?

2011-12-01 Thread Manakel
Great, i believe it clarifies a lot of misunderstanding from my side :-). Basically, correct me if am wrong: - the query is only evaluated at the time of the select. - we can create query object for both parts of the query and assemble them and they 'll be evaluated at the time of the select -

[web2py] Re: Best practices: When to use classes

2011-12-01 Thread lyn2py
Thanks Alan for sharing the link to Martin's slides. I can't read Spanish so I don't understand most of it, but I briefly caught the idea to use classes in modules (define tables). On Dec 1, 7:24 pm, Alan Etkin spame...@gmail.com wrote: Martin Mulone has made a great work documenting new web2py

[web2py] Re: Speed of JOIN vs Recursive SELECTs

2011-12-01 Thread Cliff
It seems odd that your join query takes several seconds on a local machine with a small amount of data. You can use web2py populate to load your database with more entries for a more definitive test. Postgresql is very solid. Whatever dbms you select, install it and develop with it at the

[web2py] Set/change modules folder location for an app

2011-12-01 Thread Alan Etkin
I would like to be able to change by a model/controller instruction to change the path from where the modules are imported, Suppose my web2py app is stored at ~/web2py/applications/myweb2pyapp Instead making local_import(model) for a model stored at myweb2pyapp/ models/model.py, i need to make

[web2py] Re: Speed of JOIN vs Recursive SELECTs

2011-12-01 Thread Anthony
A simple join with a small amount of data probably shouldn't be taking several seconds, so perhaps something else is going on here. Can you post your code and data? Recursive selects will do a query for each record, so you should only use them if you need to extract just one or a few records.

[web2py] Re: Set/change modules folder location for an app

2011-12-01 Thread Anthony
First, you don't import models -- they are automatically executed by the framework. Instead, you import modules (which can be anywhere in the usual Python sys.path, or in your application's /modules folder). Also, local_import has been deprecated. You can now import modules from your

[web2py] Re: Decimal vs float

2011-12-01 Thread Ross Peoples
Is 'decimal' the best field type for storing financial amounts that will be involved in math calculations? I've been doing a lot of research on the decimal vs float thing for a while, and every database admin I've ever talked to about it says the same thing: When it comes to financial

[web2py] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
I think I'll use web2py multi-tenancy, but I have some doubts: I have different user profiles in my app: a) customer: can view/edit only it's own data. b) seller: can view/edit its own data and his customers' data, too. c) back-office: can view/edit all sellers' data and any customer's data, but

[web2py] Re: Decimal vs float

2011-12-01 Thread Ross Peoples
Further examples: quantity = 20.5 unit_cost = Decimal('2.99') total_cost = Decimal(str(quantity)) * unit_cost Or using the the example you provided above: if ((form.vars.drops * form.vars.price_change) / form.vars.start_price) 0.20 Assuming that form.vars.drops is a float, and

[web2py] Re: Set/change modules folder location for an app

2011-12-01 Thread Alan Etkin
Instead making local_import(model) for a model stored at myweb2pyapp/ models/model.py, i need to make the same statement for a model stored at ~/another/path/module.py I meant import modules, sorry for the mistake. So to import a module from another path i could do: from gluon.custom_import

[web2py] Re: Decimal vs float

2011-12-01 Thread Cliff
if ((form.vars.drops * form.vars.price_change) / form.vars.start_price) 0.20: TypeError: can't multiply sequence by non-int of type 'Decimal' I think form.vars.drops is a string. I usually do something like Decimal(form.vars.somedecimalfield or 0) For the benefit of Python newcomers reading

[web2py] Re: How to get the only the value of the Sum in a sum Query?

2011-12-01 Thread Anthony
Mostly right, except it's not a query object but an expression object. Note, that str(expression) returns the actual SQL statement that will be executed, so in theory it could be dependent on the particular db adapter being used. As you noticed, that SQL statement is used as the key for

[web2py] Re: Decimal vs float

2011-12-01 Thread Cliff
I forgot to say the Python tutorial says to use Decimal for financial calcs to avoid rounding errors. On Nov 27, 8:33 pm, pbreit pbreitenb...@gmail.com wrote: I have some price fields specified as type 'decimal'. But am finding that I have to cast to 'float' do do any math (or the other to

[web2py] How to define a central validation (enforced for any controller/view) for a model?

2011-12-01 Thread Manakel
Hello, Here is the use case. I have 2 Entities A B (Models) that can be linked together using a m2m relationships in a link table. the 2 Entities each have a 'category' field and there are some business rules like Items of A with category C1 are not allowed to be linked to Items of B with

[web2py] Re: Hello i need help in web2py

2011-12-01 Thread Alan Etkin
Then I am trying create the code. But fault some details Is there any error output? It would be better if you posted a relevant model section too. Doesn't this raise an AttributeError?: getattr (db [table] id_field) 0 i think it must be: getattr(db[table],id_field, 0) 0 On Nov 30, 8:17 am,

[web2py] Re: Set/change modules folder location for an app

2011-12-01 Thread Anthony
On Thursday, December 1, 2011 8:58:03 AM UTC-5, Alan Etkin wrote: Instead making local_import(model) for a model stored at myweb2pyapp/ models/model.py, i need to make the same statement for a model stored at ~/another/path/module.py I meant import modules, sorry for the mistake. So to

[web2py] Re: How to define a central validation (enforced for any controller/view) for a model?

2011-12-01 Thread Anthony
Yes, validators are for form input, but you can have them applied to regular inserts and updates by using validate_and_insert() and validate_and_update() in place of insert() and update(). Anthony On Thursday, December 1, 2011 9:07:07 AM UTC-5, Manakel wrote: Hello, Here is the use case. I

[web2py] Re: Speed of JOIN vs Recursive SELECTs

2011-12-01 Thread lyn2py
Thanks guys for the assistance. This is my testing code... #controller def show(): discussion = db((db.discussion.id==request.args(0)) (db.discussion.created_by==db.auth_user.id)).select().first() replies = db((db.replies.discussion_id==request.args(0))

[web2py] Re: Wizard builder

2011-12-01 Thread Alan Etkin
On the last lines you wrote. What about using the web2py plugin system to subclass forms? On plugin_wizard.py: class MyWizard(SQLFORM): def __init__(self, auth): ... Just a comment, don't know if it is correct or it has design/ performance issues. Then it would be possible to reuse

[web2py] Re: Speed of JOIN vs Recursive SELECTs

2011-12-01 Thread Anthony
Try adding {{=response.toolbar()}} to your view. That will include a button for db timings showing the time for each query. Compare the join version with the recursive select version. Anthony On Thursday, December 1, 2011 9:25:08 AM UTC-5, lyn2py wrote: Thanks guys for the assistance. This

[web2py] Re: Wizard builder

2011-12-01 Thread Anthony
Maybe this will help: http://labs.blouweb.com/powerformwizard/default/index On Tuesday, November 29, 2011 4:10:03 PM UTC-5, bluemoth wrote: Hi all, I'm involved with a project that requires many wizards to collect information. I could build these wizards by hand or develop a module to

[web2py] How to Query on related fields ?

2011-12-01 Thread Manakel
Hello, I have a model with 2 tables with a reference relationship between the two. = the Budget has a type and the name/attributes of this type are defined in the budget_types table. Now in a query on the budget table i would like to retrieve the name of the Budget type and not the Budget Type

[web2py] Validate user is logged in before form submission

2011-12-01 Thread lyn2py
I have tried a few methods to get this to work, but to no avail. I hope I can get some help with this. ** The long version: When a user is logged in and loads a page (containing a reply form at the bottom), he is able to type in his reply. Presuming he takes very long to type the reply

Re: [web2py] Doubt about multi-tenancy

2011-12-01 Thread Nik Go
look for roles, groups and memberships in the book On Thursday, December 1, 2011, Vinicius Assef wrote: I think I'll use web2py multi-tenancy, but I have some doubts: I have different user profiles in my app: a) customer: can view/edit only it's own data. b) seller: can view/edit its own

[web2py] Re: How to Query on related fields ?

2011-12-01 Thread lyn2py
Hi Manakel, I've been playing with joins and found this reference to be very helpful. Perhaps it may help you too: http://web2py.com/book/default/chapter/06#Inner-Joins Based on your code, I think you are probably looking for recursive selects in web2py (vs related in django). It is referenced

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Anthony
Very nice. Just added it to web2py.com/poweredby. You might consider setting a max width in pixels for the content -- it gets a little too spread out on a wide screen (text is particularly hard to read with very long lines). Anthony On Thursday, December 1, 2011 1:38:01 AM UTC-5, Julio F.

Re: [web2py] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
I've looked for it and I'm using them. My doubt is about multi-tenancy, but I think it won't help me in this case, because I have users with full access, who don't can count on filtered accesses. -- Vinicius Assef. On Thu, Dec 1, 2011 at 12:44 PM, Nik Go nikolai...@gmail.com wrote: look for

[web2py] Re: Speed of JOIN vs Recursive SELECTs

2011-12-01 Thread lyn2py
Good tip! I didn't realize that the dbstats showed database timings. I tried my code again (but did not reference dbstats at the time). I noticed that only the first time the page is loaded (after the changes in code) that it takes very long (a few seconds). Subsequent reloading seemed to be

[web2py] Re: Speed of JOIN vs Recursive SELECTs

2011-12-01 Thread Anthony
Do the db timings differ between first load and subsequent reloading? What are the times? On Thursday, December 1, 2011 9:57:59 AM UTC-5, lyn2py wrote: Good tip! I didn't realize that the dbstats showed database timings. I tried my code again (but did not reference dbstats at the time). I

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread Anthony
When the form is submitted, your function first checks if the user is logged in -- if not, it never gets to the code that creates or processes the form, so of course it can't execute your onvalidation function. Also, 'onvalidation' should be a function, not a call to a function (i.e., just

[web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Anthony
I think what's more important is the identity of web2py (logo, website etc) needs to be more consistent than now. There's an old logo on here, and another logo on the website, and a new logo coming up (Batman? in Bruno's links)... I think there have only ever been two logos -- the original,

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread lyn2py
Reply below On Dec 1, 11:15 pm, Anthony abasta...@gmail.com wrote: When the form is submitted, your function first checks if the user is logged in -- if not, it never gets to the code that creates or processes the form, so of course it can't execute your onvalidation function. Also, I think

Re: [web2py] Doubt about multi-tenancy

2011-12-01 Thread Nik Go
request_tenant wouldn't fulfill all your requirements, it should work in conjuntion with permissions. On Thursday, December 1, 2011, Vinicius Assef wrote: I've looked for it and I'm using them. My doubt is about multi-tenancy, but I think it won't help me in this case, because I have users

Re: [web2py] app slow to death (sorry double post because empyt object)

2011-12-01 Thread Richard Vézina
Use top, iotop, itop and screen so I can switch between those top... I tried what preibt suggest on other thread (same thread double post one without object) and replace Apache and wsgi by nginx and uwsgi... No much difference and still the 45% 100%... But it sometime goes over 45%. For those

[web2py] Re: How to Query on related fields ?

2011-12-01 Thread Omi Chiba
Manakel, I'm also pretty sure you need to use join. Here's my related forum post. http://groups.google.com/group/fameisfame/browse_thread/thread/3b5de92b728d3d5a/b7cbc4a3740b5ecc?q=#b7cbc4a3740b5ecc On Dec 1, 8:40 am, Manakel manakel...@gmail.com wrote: Hello, I have a model with 2 tables

Re: [web2py] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
Actually, may I remake my question. Taking the book example of multi-tenancy, what if I have a role that can read anything, from the tables with multi-tenancy? Is it possible to have queries that don't filter automatically? -- Vinicius Assef. On Thu, Dec 1, 2011 at 1:38 PM, Nik Go

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread Anthony
On Thursday, December 1, 2011 10:37:20 AM UTC-5, lyn2py wrote: Reply below On Dec 1, 11:15 pm, Anthony abas...@gmail.com wrote: When the form is submitted, your function first checks if the user is logged in -- if not, it never gets to the code that creates or processes the form, so of

[web2py] Re: Doubt about multi-tenancy

2011-12-01 Thread lyn2py
Profiles c, d and e can be implemented with groups or permissions: http://web2py.com/book/default/chapter/08#Decorators http://web2py.com/book/default/chapter/08#Combining-Requirements If you've tried the above and it doesn't work, post your code to receive help! Sometimes after looking at the

[web2py] [solved] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
I found the solution: http://groups.google.com/group/web2py/browse_thread/thread/38a07b7e00b789ac/6bae4627c7587ddd?lnk=gstq=tenant#6bae4627c7587ddd On Thu, Dec 1, 2011 at 1:52 PM, Vinicius Assef vinicius...@gmail.com wrote: Actually, may I remake my question. Taking the book example of

[web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Omi Chiba
Massimo, It does take time and effort in building a brand and we are succeeded. We should not start again. We can give animal names to various stable version if you like. Yap, I knew it doesn't make sense to discuss changing the name now. We should stick with the current name to keep the

[web2py] Re: [solved] Doubt about multi-tenancy

2011-12-01 Thread Anthony
On Thursday, December 1, 2011 10:57:57 AM UTC-5, viniciusban wrote: I found the solution: http://groups.google.com/group/web2py/browse_thread/thread/38a07b7e00b789ac/6bae4627c7587ddd?lnk=gstq=tenant#6bae4627c7587ddd In fact, I don't think you specifically have to use 'ignore_tenant' -- I

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread lyn2py
On Dec 1, 11:53 pm, Anthony abasta...@gmail.com wrote: On Thursday, December 1, 2011 10:37:20 AM UTC-5, lyn2py wrote: Reply below On Dec 1, 11:15 pm, Anthony abas...@gmail.com wrote: When the form is submitted, your function first checks if the user is logged in -- if not, it never

[web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread lyn2py
I can name the next version reindeer or rudolph ... just kidding. For Christmas!

[web2py] Re: Validate user is logged in before form submission

2011-12-01 Thread Anthony
You could check for login after creating the form but before processing it, and if not logged in, still return the form, with the flash message. I appreciate your guidance and assistance (a website? code examples?) to do this. Thank you! Maybe something like this (not tested): def

Re: [web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Jonathan Lundell
On Dec 1, 2011, at 8:09 AM, lyn2py wrote: I can name the next version reindeer or rudolph ... just kidding. For Christmas! Blitzen, obviously.

Re: [web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread Jonathan Lundell
On Dec 1, 2011, at 8:19 AM, Jonathan Lundell wrote: On Dec 1, 2011, at 8:09 AM, lyn2py wrote: I can name the next version reindeer or rudolph ... just kidding. For Christmas! Blitzen, obviously. Or Fulmineo.

Re: [web2py] Re: [solved] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
Thanks, Anthony. Now, I understand better web2py multi-tenancy. On Thu, Dec 1, 2011 at 2:05 PM, Anthony abasta...@gmail.com wrote: On Thursday, December 1, 2011 10:57:57 AM UTC-5, viniciusban wrote: I found the solution:

[web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Constantine Vasil
I want to use SQLFORM.factory to define a check box field with a list of email addresses. When the user checks several, then to send an email to the selected. How to do that?

Re: [web2py] Re: web2py logo and layout has changed one year ago...

2011-12-01 Thread António Ramos
Better yet Call it PIERRO short and simple :) 2011/12/1 Jonathan Lundell jlund...@pobox.com On Dec 1, 2011, at 8:19 AM, Jonathan Lundell wrote: On Dec 1, 2011, at 8:09 AM, lyn2py wrote: I can name the next version reindeer or rudolph ... just kidding. For Christmas! Blitzen,

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Nik Go
IS_IN_DB(db, 'field.id', db.table._format, *multiple=True*) process the selection with onvalidation On Friday, December 2, 2011, Constantine Vasil wrote: I want to use SQLFORM.factory to define a check box field with a list of email addresses. When the user checks several, then to send an

Re: [web2py] [flashback] web2py logo and layout has changed one year ago...

2011-12-01 Thread Nik Go
+1. The name isn't so bad. We could all probably name other projects with worse names. The packaging, if that is really important to the community would help improve the image. Django's packaging is not suprising since it was originally developed internally in a news company - the media is

[web2py] Re: How to Query on related fields ?

2011-12-01 Thread Cliff
I was thinking about doing budget_list= db().select(db.budgets.id,db.budgets.name,db.budgets.type.name,db.budgets.m onthly_amount,orderby=db.budgets.view_order).as_list() Do you want to do this because you are getting the budget type id in your returned rows? Try this:

[web2py] [flashback] web2py logo and layout has changed one year ago...

2011-12-01 Thread Nik Go
+1. The name isn't so bad. We could all probably name other projects with worse names. The packaging, if that is really important to the community would help improve the image. Django's packaging is not suprising since it was originally developed internally in a news company - who knows more

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Constantine Vasil
My values are not in a database but in a list: [[u'John Doe', u'john_...@gmail.com'], [u'Mary Doe', u'mary_...@gmail.com']] how to get them from there? I want names to show up next to the check boxes, when selected to know which email address is corresponding in order to send a message to

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Kenneth Lundström
You either have an multi select select item in the form or then you need to make as many field as the is e-mail addresses. Either: form.factory( Field('addresses', requires = IS_IN_SET=[[u'John Doe', u'john_...@gmail.com'], [u'Mary Doe', u'mary_...@gmail.com']])) form.factory(

[web2py] Web2py Application Exhibition Version 3.0

2011-12-01 Thread NetAdmin
Web2py Application Exhibition Version 3.0 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. Watch this list for more details! ( Soon ) Mr.NetAdmin

[web2py] Re: Say hello to i-Track

2011-12-01 Thread Plumo
Another fine app from Julio! What do you plan to use it for? Is anyone else interested in a helpdesk style app? An issue tracker is a good base.

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Nik Go
yourlist = [[u'John Doe', u'john_...@gmail.com'], [u'Mary Doe', u' mary_...@gmail.com']] and in your validator IS_IN_SET(yourlist, *multiple=True*) multiple to render checkboxes. On Friday, December 2, 2011, Kenneth Lundström wrote: You either have an multi select select item in the form or

[web2py] type 'exceptions.KeyError' 'id' on 1.99.3 with SQLFORM.grid and links

2011-12-01 Thread David Watson
I am running web2py version 1.99.3 I have the following code in my default controller. The view shows the item. When i run links = [lambda row: A('Edit',_href=URL(default,sweeps,args=[row.id])), lambda row: A('Delete',_href=URL(default,promos,args=[row.id]))] grid2 =

[web2py] Re: type 'exceptions.KeyError' 'id' on 1.99.3 with SQLFORM.grid and links

2011-12-01 Thread Anthony
Does your query/grid include the 'id' field? Did the same code used to work on 1.99.2? On Thursday, December 1, 2011 1:13:16 PM UTC-5, David Watson wrote: I am running web2py version 1.99.3 I have the following code in my default controller. The view shows the item. When i run links =

[web2py] Problem connecting web2py app to mysql server v4

2011-12-01 Thread juanduke
Hi All: I've developed an app, now is time to depoly in production server. In development stage the app works perfect, using with mysql v5. Even if access from console, using mysql -u *username* -p *password* -h *serverIP ... * logged in as expected. And my production server, cant be upgraded

Re: [web2py]

2011-12-01 Thread Richard Vézina
Thanks for the cue... I try it, but it didn't solve my speed problem... I think I will switch anyway soon since it seems much better then Apache (more light)... Is there any drawback to switch to it? I will try some of the solution propose in the book about scaling... I will try by splitting my

Re: [web2py] [flashback] web2py logo and layout has changed one year ago...

2011-12-01 Thread Jim Steil
As someone coming from the TurboGears environment, I would vote to keep the name the same. TG suffered/suffers greatly (in my opinion) from the change from V1 to V2. Lots of us were lost in the change. I think it's really important for web2py to remain stable. That includes the name. Logo

[web2py] Re: Problem connecting web2py app to mysql server v4

2011-12-01 Thread juanduke
Solved with this trick I edited *gluon/dal.py* adding *try*/*except: pass* code, around the 3 lines where is this self._execute(SET sql_mode='NO_BACKSLASH_ESCAPES';)line. I'm sure that isnt the correct solution, but helped to see the app running :) If someone has a better solution, is

Re: [web2py] How to use SQLFORM.factory to define a check box field with a list of values?

2011-12-01 Thread Constantine Vasil
How this solution handles error handling? For other fields there are messages in red below the fields.

Re: [web2py] ImportError with plugin

2011-12-01 Thread haikuvend Resident
I installed the plugin via the admin interface, which consists of two files. I kept the module and deleted the demo controller manually, as I had no use for that.

[web2py] SQLFORM.grid and query

2011-12-01 Thread peter
I am using SQLFORM.grid. I have a boolean field todo. If I select this in query, and select True as the value, nothing happens. If I click 'query' it simply resets the query. If I click 'search', it too clears the query, and finds all the records. How can I get it to find only the records with

[web2py] Re: user tickets vs. system exception tickets?

2011-12-01 Thread Anthony
In routes.py, you can specify routes_onerror. The error route can point to a special error handling function in the same app or another app. The error handler will receive the HTTP error code, ticket number, request.env.request_uri, and request.url as GET variables. The error handler can then

[web2py] Re: How to add a trailig slash? web2py + trailing slash needed from jQuery Mobile

2011-12-01 Thread Anthony
On Wednesday, November 30, 2011 11:55:13 PM UTC-5, Constantine Vasil wrote: Are there a way to use trailing slash after page name like: /about/ Are you saying you want to generate URLs with the URL() function that include a trailing slash? If so, just do URL('default', 'index') + '/'.

[web2py] Re: SQLFORM.grid and query

2011-12-01 Thread Anthony
I think you have to click and or or to get the filter added to the query. On Thursday, December 1, 2011 3:29:11 PM UTC-5, peter wrote: I am using SQLFORM.grid. I have a boolean field todo. If I select this in query, and select True as the value, nothing happens. If I click 'query' it

[web2py] Re: SQLFORM.grid and query

2011-12-01 Thread Omi Chiba
Peter, It may be related to the latest issue #519. http://code.google.com/p/web2py/issues/detail?id=519 On Dec 1, 2:29 pm, peter peterchutchin...@gmail.com wrote: I am using SQLFORM.grid. I have a boolean field todo. If I select this in query, and select True as the value, nothing happens.

[web2py] Re: JQuery Mobile + web2py - how to set data-url attribute dynamically? bodydiv data-role=page data-url=docs/pages/docs-links-urltest/

2011-12-01 Thread Anthony
What value do you want data-url to take -- is it always the URL of the current page? Then maybe URL() + '/'. On Thursday, December 1, 2011 12:05:34 AM UTC-5, Constantine Vasil wrote: JQuery Mobile + web2py presents unique challenge because JQuery Mobile takes over control after server side.

Re: [web2py] Re: How to add a trailig slash? web2py + trailing slash needed from jQuery Mobile

2011-12-01 Thread Jonathan Lundell
On Dec 1, 2011, at 12:45 PM, Anthony wrote: On Wednesday, November 30, 2011 11:55:13 PM UTC-5, Constantine Vasil wrote: Are there a way to use trailing slash after page name like: /about/ Are you saying you want to generate URLs with the URL() function that include a trailing slash? If so,

[web2py] Submit gutton in fields

2011-12-01 Thread Rick
Hi, How to change the text on the submit button in fields? Here'sthe code: Field('thedate', 'date', label=T(''), widget=SQLFORM.widgets.date.widget)) I tried with this, but i didn't work: Field('thedate', 'date', label=T(''), submit=INPUT(_type='submit'('Some text')),

[web2py] Re: app slow to death (sorry double post because empyt object)

2011-12-01 Thread KMax
How you have tested the load? What is your CPU/RAM ? How did you configure tread/process of wsgi ? I have a case when all slow down was on .first() or .last() ofter db was populated On 1 дек, 22:44, Richard Vézina ml.richard.vez...@gmail.com wrote: Use top, iotop, itop and screen so I can

[web2py] One Queue

2011-12-01 Thread Martin Weissenboeck
Hi, I want to use one and only one queue (q). Some applications/controllers should act as producers (q.put(item)) and some applications/controllers as consumers (item=q.get()), but with only one queue. How can this be done? Regards, Martin

[web2py] Re: Submit gutton in fields

2011-12-01 Thread Anthony
Submit buttons are not in fields, they are added as an input element to an entire form. Where is that Field definition -- in a table definition or SQLFORM.factory? Anyway, SQLFORM takes a 'submit_button' argument, which is the text for the submit button. Anthony On Thursday, December 1, 2011

Re: [web2py] Re: app slow to death (sorry double post because empyt object)

2011-12-01 Thread Richard Vézina
Answer in the text : On Thu, Dec 1, 2011 at 4:05 PM, KMax mkostri...@gmail.com wrote: How you have tested the load? ~15 users accessing the app and simulating their work... What is your CPU/RAM ? Intel(R) core 2 CPU E7500 2.93GHz / ram 2 gig How did you configure tread/process of wsgi

[web2py] Re: Submit gutton in fields

2011-12-01 Thread Rick
Thanks! This is the final code: dayform = SQLFORM.factory( Field('thedate', 'date', label=T(''), widget=SQLFORM.widgets.date.widget), submit_button='Some text') On Dec 1, 10:12 pm, Anthony abasta...@gmail.com wrote: Submit buttons are not in fields, they are added as an input

[web2py] How send multiple email messages with GAE deferred.defer?

2011-12-01 Thread Constantine Vasil
I want to send multiple email messages with GAE deferred.defer: deferred.defer(send_email_message, reply_to=reply_to, reply_to_email_addr=reply_to_email_addr, sender_name=sender_name, etc. ERROR=Can't

[web2py] Re: SQLFORM.grid and query

2011-12-01 Thread villas
Sorry to include this in the same thread, but I think it may be of interest to a similar audience... Given that SQLFORM.grid uses DAL smart_query... It seems that smart_query does not implement: 'belongs' | 'in' Is that an omission, or by design, or have I missed something?

  1   2   >