[web2py:32790] Re: How to Change the css style color and text of submit button on a crud.create form in controller

2009-10-13 Thread mdipierro
I did not get it. On Oct 12, 10:19 pm, mr.freeze nat...@freezable.com wrote: I just sent you another patch that allows you to filter by tag also: text = form.element(input,_type=text) both = form.elements(input,select,_class=test) It should be backwards compatible. On Oct 11, 4:30 pm,

[web2py:32791] crude XMPP client

2009-10-13 Thread murray3
Whilst I am awaiting info on ways to code a xmpp client in javascript (current offerings seem to require BOSH and do not seem to want to work with google talk) I thought of trying a crude version just using web2py and jquery. I need to know how a contrroller function (message) from another app

[web2py:32792] Re: newbie: returning Controller variable to View

2009-10-13 Thread ed
Hi Massimo, Thank you for the advice, I used web2py login() method but was not totally satisfied 'cuz it would make login form error display inconsistent with my other apps. In my other apps the form errors are displayed in form.errors.vars (below the variables e.g. below email field-'Email

[web2py:32793] OID's

2009-10-13 Thread annet
I am using PostgreSQL as a database and wonder wether I have to preserve OIDs when running pg_dump. Kind regards, Annet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group,

[web2py:32794] Multiple Requires criteria

2009-10-13 Thread Michael - afewtips.com
Hi, I am trying to use 2 different criteria but when I do, the drop down list doesn't show up any longer. SQLField('field','string',requires=[IS_NOT_EMPTY(),IS_IN_SET (['Val1','Val2','Val3'])]) A couple of examples I saw used this format. Is this the correct syntax? Thanks Michael

[web2py:32795] Re: Multiple Requires criteria

2009-10-13 Thread DenesL
By design the dropdown is only created on single requires, not lists of them. But you only need IS_IN_SET in this case, the field can not be empty unless that is one the options in the set. On Oct 13, 6:04 am, Michael - afewtips.com afewt...@gmail.com wrote: Hi, I am trying to use 2

[web2py:32796] Re: Error with Database (MySQL) when using latest release....

2009-10-13 Thread Rick
I have also come across this with web2py 1.67.2, using stock MySQL on Ubuntu 8.10, when I add unique=True to a string column in a table definition. On Sep 22, 11:13 am, Yannick ytchatch...@gmail.com wrote: Hello mate, Below you can find the error message that I received from Database (MySQL)

[web2py:32797] How To Unlock Locked iPod

2009-10-13 Thread Ipod
How To Unlock Locked iPod http://bit.ly/hddpp http://bit.ly/hddpp How To Unlock Locked iPod --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

[web2py:32798] Re: Multiple Requires criteria

2009-10-13 Thread Michael - afewtips.com
Thanks - very much - that's a good point. I think I was focusing more on the multiple criteria and not the logic. But it's good to know that the lists can only have 1 criteria. Michael On Oct 13, 9:34 am, DenesL denes1...@yahoo.ca wrote: By design the dropdown is only created on single

[web2py:32799] Re: Multiple Requires criteria

2009-10-13 Thread Thadeus Burgess
IS_IN_SET can have multiple criteria if you specify multiple=True IS_IN_SET(('G', 'C'), ('Glasses', 'Contacts'), multiple=True), widget=SQLFORM.widgets.checkboxes.widget -Thadeus On Tue, Oct 13, 2009 at 9:30 AM, Michael - afewtips.com afewt...@gmail.comwrote: Thanks - very much - that's a

[web2py:32800] Re: Multiple Requires criteria

2009-10-13 Thread Iceberg
Maybe you understand, but you still do not say it right. A list of validators can have more than one criteria (means validator here) if you want, but just that it can not be automatically rendered as a drop- down widget. And in your case, you just don't need multiple criteria (aka validator).

[web2py:32801] Re: Add button next to combo box

2009-10-13 Thread Renato-ES-Brazil
Massimo, #1. Any idea? :-) #2. Is there any way of SQLFORM put the same values into the attributes ID and NAME? On 12 out, 23:17, Renato-ES-Brazil caliari.ren...@gmail.com wrote: Massimo, Sorry, I'll try to explain better... I know that the values are in request.vars, therefore I made

[web2py:32802] Re: Add button next to combo box

2009-10-13 Thread Thadeus Burgess
Perhaps its a problem with _formkey? -Thadeus On Tue, Oct 13, 2009 at 11:17 AM, Renato-ES-Brazil caliari.ren...@gmail.com wrote: Massimo, #1. Any idea? :-) #2. Is there any way of SQLFORM put the same values into the attributes ID and NAME? On 12 out, 23:17, Renato-ES-Brazil

[web2py:32803] FYI: Ext JS Designer Preview

2009-10-13 Thread mikech
Looks interesting: http://www.extjs.com/blog/2009/10/08/ext-js-designer-preview/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To

[web2py:32804] Migrating date to datetime - appadmin error

2009-10-13 Thread Thadeus Burgess
I just changed my database signup_date column from date to datetime, and receive the following error when trying to view the rows in appadmin. Db is using Field(signup_date, datetime, notnull=True, default=request.now), Of course, most of my records already included just the date.

[web2py:32805] Re: request.now.month

2009-10-13 Thread Carl
hi, Is there a recommended alternative implementation for those hosting on appengine? Does one store year, month, day in separate fields for example? On Sep 29, 3:15 pm, mdipierro mdipie...@cs.depaul.edu wrote: Themonthon the right is the attribute of a date/datetime object.GAE supports it.

[web2py:32806] Re: Why does this NOT pass validation? (bug?)

2009-10-13 Thread Thadeus Burgess
Massimo, can you teach me what the proper way to submit a patch is? -Thadeus On Mon, Oct 12, 2009 at 4:50 PM, Thadeus Burgess thade...@thadeusb.comwrote: K this seems to fix it. It inserts None into database if nothing is selected. It seems to work fine, using appadmin on inserted blank

[web2py:32807] Re: Migrating date to datetime - appadmin error

2009-10-13 Thread mdipierro
Because you have dates in the existing records and they does not have a time. You need to update existing records: for row in db(db.table.id0).select(): row.update_record(datetimefield=row.datetimefield) On Oct 13, 12:33 pm, Thadeus Burgess thade...@thadeusb.com wrote: I just changed my

[web2py:32808] Re: Why does this NOT pass validation? (bug?)

2009-10-13 Thread mdipierro
email me! On Oct 13, 4:00 pm, Thadeus Burgess thade...@thadeusb.com wrote: Massimo, can you teach me what the proper way to submit a patch is? -Thadeus On Mon, Oct 12, 2009 at 4:50 PM, Thadeus Burgess thade...@thadeusb.comwrote: K this seems to fix it. It inserts None into database if

[web2py:32809] Re: Add button next to combo box

2009-10-13 Thread Renato-ES-Brazil
Thadeus, But when I create the form manually it works. The only difference is that I put the same value into the attributes ID and NAME. Thanks. On 13 out, 13:29, Thadeus Burgess thade...@thadeusb.com wrote: Perhaps its a problem with _formkey? -Thadeus On Tue, Oct 13, 2009 at 11:17 AM,

[web2py:32810] Re: Add button next to combo box

2009-10-13 Thread Thadeus Burgess
So basically, you have a form created with SQLFORM, then there is an add button, when you click it, you can add new records, then ajax returns and you append the new options to the form? So the form fails only if you add new? Is this the correct understanding of the problem? If so, I believe it

[web2py:32811] Eclipse, json and reaching breaking point

2009-10-13 Thread Carl
hi, I'm using XP, Eclipse, Web2py/json/pyjs and running dev_appserver When I place breakpoints on code in functions in controllers/ default.py and in methods in modules/subscriptions.py only the latter are tripped. Any idea what might be going on? When I run web2py.py both sets of breakpoints

[web2py:32812] Deploying Web2py on a server without root access

2009-10-13 Thread dekushrub
Hey, I'm trying to write a website for a student group and we don't have root access. It's an apache server that has python installed on it, how do I take my webapp and make it run on the server? --~--~-~--~~~---~--~~ You received this message because you are

[web2py:32813] Re: Add button next to combo box

2009-10-13 Thread Renato-ES-Brazil
The form fails in any attempt to add new record. :-( The form.accepts always fails because the method isn't able to find the values from the required fields, even they being filled out and to be in the request.vars properly. I notice that it happens because the ID and NAME attributes created by

[web2py:32814] Re: Deploying Web2py on a server without root access

2009-10-13 Thread Julio
You don't *necessarily* need root access to run web2py on a server, especially if you already have apache and python installed, you will need root access most likely to properly setup your system, (i.e. modify your apache conf file to work with web2py, set up a DB server or even access to the SQL

[web2py:32815] Re: Add button next to combo box

2009-10-13 Thread Renato-ES-Brazil
Fixing: The code that I posted had a error because I'd edited manually here. The error was: _id=form_name instead of _id=form_test. See below:     form = SQLFORM(db.product, _enctype=None, _id=form_name, _action=None, _method=None) The correct line is: form = SQLFORM(db.product,

[web2py:32816] IS_MATCH

2009-10-13 Thread Sophie
Whats wrong with this code? db.Person.nPerson.requires=IS_NOT_EMPTY('You should insert a name'),IS_UPPER(),IS_MATCH('([a-zA-Z]*[ ]*[áÁ]*[éÉ]*[íÍ]*[óÓ]*[úÚ]*) +',error_message='Only insert a-z A-Z áÁ éÉ íÍ óÓ úÚ and spaces'),IS_NOT_IN_DB(db, 'Person.nPerson','This person is in the database')

[web2py:32817] Re: FYI: Ext JS Designer Preview

2009-10-13 Thread Richard
very promising. Looks like it has been inspired by Qt Designer. Is there anything equivalent for JQuery? Richard On Oct 14, 4:31 am, mikech mp.ch...@gmail.com wrote: Looks interesting:http://www.extjs.com/blog/2009/10/08/ext-js-designer-preview/

[web2py:32818] Re: Interesting Javascript Project

2009-10-13 Thread Richard
if they could support the basic Python language and then use pypy for the standard libraries, this could be really awesome. On Oct 12, 5:40 pm, Thadeus Burgess thade...@thadeusb.com wrote: It's python, with a javascript compiler! So you can write python client side code. I just thought this

[web2py:32819] Re: hg and google

2009-10-13 Thread Richard
bitbucket gives max 150MB for free - would that be a problem? Google Code offers 1024MB, which can be increased if necessary: http://googlecode.blogspot.com/2008/12/happy-holidays-from-google-code.html I noticed the other major Python frameworks have rolled their own SVN solutions: -

[web2py:32820] Re: Add button next to combo box

2009-10-13 Thread mr.freeze
There are a couple of problems I think: There is a hidden field called product_create that needs to be sent back too: input type=hidden value=product_create name=_formname/ The built in ajax function explicitly grabs fields by ID which won't work for you since it will send

[web2py:32821] Re: Add button next to combo box

2009-10-13 Thread Renato-ES-Brazil
mr.freeze, ** It worked! Thank you very much!!! :-) ** Doubt: #1 I don't understand very well about the hidden field product_create. Could you explain? Note: I've not used it in my new code. On 13 out, 21:30, mr.freeze nat...@freezable.com wrote: There are a couple

[web2py:32822] Re: Add button next to combo box

2009-10-13 Thread mr.freeze
It's the form name. You may not need it. _formname is necessary for pages that contain and process multiple forms. It is added to the form during form.accepts along with _formkey to prevent double submission. More info on page 201 (labeled 185) in the manual. Glad it worked! In general, it

[web2py:32823] Re: Add button next to combo box

2009-10-13 Thread Renato-ES-Brazil
Now, I got it! Thanks! :-) On 13 out, 22:04, mr.freeze nat...@freezable.com wrote: It's the form name.  You may not need it. _formname is necessary for pages that contain and process multiple forms.  It is added to the form during form.accepts along with _formkey to prevent double

[web2py:32825] Re: Error with Database (MySQL) when using latest release....

2009-10-13 Thread Yannick
Yes I had this error message once, I don't remember exactly how i get around this though... I think what happen was I changed an attribute of the database table and migrate was set to True and I got that error message... And then I set migrate to False... And i think that day I restore my

[web2py:32826] Snippets

2009-10-13 Thread Alex Fanjul
It would be useful if we could add [SNIPPET] to the end of a email (in thread) to indicate that its a future useful source code (as we are doing with [SOLVED] problems already). In this way, we could search/parse/filter for interesting snippets like this one from Thadeus... (by now, I used

[web2py:32827] Re: Snippets

2009-10-13 Thread mr.freeze
What about posting them on web2pyslices.com or the wiki then linking at the end of the thread? Google groups is a bad place to post code as it messes the formatting and is unsearchable after a couple of months unless you use a third party site like gmane. On Oct 13, 8:26 pm, Alex Fanjul

[web2py:32828] incoming email on GAE

2009-10-13 Thread Richard
The new GAE supports incoming email: http://googleappengine.blogspot.com/2009/10/app-engine-sdk-126-released-with.html Would support for this be possible/practical through web2py, or is it too domain specific? Richard --~--~-~--~~~---~--~~ You received this

[web2py:32829] Field functions

2009-10-13 Thread mr.freeze
This has probably been asked before but why doesn't the Field class have these?: avg, format, round, mid, len, first, last Is it because they are not common to all databases? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[web2py:32830] Re: FYI: Ext JS Designer Preview

2009-10-13 Thread Thadeus Burgess
I would say query ui would be the closest thing as of right now. -Thadeus On Tue, Oct 13, 2009 at 6:29 PM, Richard richar...@gmail.com wrote: very promising. Looks like it has been inspired by Qt Designer. Is there anything equivalent for JQuery? Richard On Oct 14, 4:31 am, mikech

[web2py:32831] Re: IS_MATCH

2009-10-13 Thread DenesL
Hi Sophie, you want IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$',...) and you can drop IS_NOT_EMPTY(...). The regex above means: match a string composed only of the characters listed from beginning to end with minimum length=1. Yours said: match a substring anywhere in the string that has zero or more

[web2py:32832] Re: Error with Database (MySQL) when using latest release....

2009-10-13 Thread mdipierro
can you email me the sql.log immediately after the error occurs? On Sep 22, 11:13 am, Yannick ytchatch...@gmail.com wrote: Hello mate, Below you can find the error message that I received from Database (MySQL) when using the latest Web2py version: 1.67.1 BUT when I use an old version Web2py:

[web2py:32833] Re: IS_MATCH

2009-10-13 Thread Jonathan Lundell
On Oct 13, 2009, at 7:59 PM, DenesL wrote: Hi Sophie, you want IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$',...) and you can drop IS_NOT_EMPTY(...). The regex above means: match a string composed only of the characters listed from beginning to end with minimum length=1. Yours said: match a

[web2py:32834] Re: IS_MATCH

2009-10-13 Thread mdipierro
validators are filters and executed in order. If IS_MATH is preceded by IS_UPPER, Sophie probably wants: IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$') Massimo On Oct 13, 10:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 13, 2009, at 7:59 PM, DenesL wrote: Hi Sophie, you want

[web2py:32835] Re: Field functions

2009-10-13 Thread mdipierro
On Oct 13, 9:02 pm, mr.freeze nat...@freezable.com wrote: This has probably been asked before but why doesn't the Field class have these?: no avg, format, round, mid, len, first, last Is it because they are not common to all databases? yes probably avg and round should be implemented

[web2py:32837] Re: IS_MATCH

2009-10-13 Thread Jonathan Lundell
On Oct 13, 2009, at 8:11 PM, mdipierro wrote: validators are filters and executed in order. If IS_MATH is preceded by IS_UPPER, Sophie probably wants: IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$') Now I'm confused. Won't IS_MATCH get all-upper-case input, then? Why check for a-z (for example)?

[web2py:32839] web2py responding to Ajax.Request from Prototype

2009-10-13 Thread pharkle
Hi, I'm hitting a REST service that is running web2py that is supposed to return JSON. When I curl the endpoint or hit it in a browser, I get a valid 200 response with the JSON I expect in the body of the response. However, when I GET this same URL using Prototype's Ajax.Request function, I get

[web2py:32841] suggection to sqlform

2009-10-13 Thread hywang
when sqlform is rendered as a table, the label of a field is wrapped by td (line 626 in sqlhtml.py), in fact, it is much more convenient for web designer if it is wrapped by 'th'. so, i suggest changing line 626 in sqlhtml.py into tr = self.trows[fieldname] = TR(TH(label), inp, comment,

[web2py:32842] Re: web2py responding to Ajax.Request from Prototype

2009-10-13 Thread mdipierro
PS. If you point us to the service I will give it a try. On Oct 13, 10:10 pm, pharkle alex.farr...@gmail.com wrote: Hi, I'm hitting a REST service that is running web2py that is supposed to return JSON.  When I curl the endpoint or hit it in a browser, I get a valid 200 response with the JSON

[web2py:/] Re: web2py responding to Ajax.Request from Prototype

2009-10-13 Thread mdipierro
web2py never returns a 0 status code. My guess is that something is wrong in the calling function. On Oct 13, 10:10 pm, pharkle alex.farr...@gmail.com wrote: Hi, I'm hitting a REST service that is running web2py that is supposed to return JSON.  When I curl the endpoint or hit it in a

[web2py:32843] Re: web2py responding to Ajax.Request from Prototype

2009-10-13 Thread pharkle
Yes, I'm not 100% on the status code, as I saw this '0' in the Prototype transport response object, though Firebug is telling me that it is a 200. I can reproduce this behavior by setting up a web2py instance with a controller: def index2(): return 'XYZ' and then an html page with the

[web2py:32844] Re: web2py responding to Ajax.Request from Prototype

2009-10-13 Thread pharkle
Yes, I'm not 100% on the status code, as I saw this '0' in the Prototype transport response object, though Firebug is telling me that it is a 200. I can reproduce this behavior by setting up a web2py instance with a controller: def index2(): return 'XYZ' and then an html page with the

[web2py:32845] Re: web2py responding to Ajax.Request from Prototype

2009-10-13 Thread pharkle
Yes, I'm not 100% on the status code, as I saw this '0' in the Prototype transport response object, though Firebug is telling me that it is a 200. I can reproduce this behavior by setting up a web2py instance with a controller: def index2(): return 'XYZ' and then an html page with the

[web2py:32846] Re: web2py responding to Ajax.Request from Prototype

2009-10-13 Thread pharkle
Sorry for posting that 3 times! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to

[web2py:32847] Re: web2py responding to Ajax.Request from Prototype

2009-10-13 Thread pharkle
I should say, this is Prototype 1.6.0.3 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to

[web2py:32848] Re: Snippets

2009-10-13 Thread Thadeus Burgess
I think posting to web2pyslices is a good idea, however, adding [SNIPPET] somewher ein the thread will help to make it searchable, and easier to add... I have been super busy with work, and still getting over the flu so I have not had time to make several slices that I have wanted to make.

[web2py:32849] Re: Field functions

2009-10-13 Thread Thadeus Burgess
Could we write python wrappers around the functions that are not supported for that particular backend? -Thadeus On Tue, Oct 13, 2009 at 10:12 PM, mdipierro mdipie...@cs.depaul.edu wrote: On Oct 13, 9:02 pm, mr.freeze nat...@freezable.com wrote: This has probably been asked before but

[web2py:32850] Re: Field functions

2009-10-13 Thread mr.freeze
You could put all of them (and more) in the Rows class but you would take a performance hit since the processing would be handled by the web server after the select is done and not the database or...put all of them in Field as well and tweak SQL_DIALECTS to flag operations as unsupported and

[web2py:32852] Re: hg and google

2009-10-13 Thread Thadeus Burgess
What about hgwebdir or roll our own app using http://mercurial.selenic.com/wiki/MercurialApi with our own custom bug/ticket module? Or we could use trac with mercurial integration? -Thadeus On Tue, Oct 13, 2009 at 10:15 PM, mdipierro mdipie...@cs.depaul.edu wrote: I do not think this is

[web2py:32853] Re: Field functions

2009-10-13 Thread Thadeus Burgess
I believe that it should be supported natively on the database backend where supported, however have a python fallback, that can mimic the function if said database does not support the operation. This way you still have the convenience of using the aggregator if its not supported, and the speed

[web2py:32854] Re: Field functions

2009-10-13 Thread mr.freeze
What about a generic sql function for Field? Here is a proof of concept: - def sql(self, name, data_type, *args): out = '' if args: out = , + ,.join([str(a) for a in args]) return Expression('%s(%s%s)' % (name, str(self), out), data_type, self._db)