[web2py:36111] Re: Customizing HTML output of forms

2009-11-27 Thread mdipierro
It normally runs standalone for general form generation. It can be used to make forms based on a db table as well. Massimo On Nov 27, 10:11 pm, Julian Yap wrote: > Is SQLFORM.factory related to ORM or can it just run standalone for > general form generation? > > On 11/27/09, Thadeus Burgess w

[web2py:36110] Re: SQLForm (set custom css classes to specified elements)

2009-11-27 Thread waTR
That sounds like it might work. I will look into it. Re: jQuery It becomes very messy when you have to do that. It is fine when the developer does the design and coding, but when working in a team you can't do that. You need to have a system in place where you have to do minimal modification/addit

Re: [web2py:36109] Re: Customizing HTML output of forms

2009-11-27 Thread Thadeus Burgess
it is what it says it is... it is a factory, so basically it creates a form that basis its widgets off DALFields that are passed, when you use .factory, you specify your fields that do not tie into any database backend. To answer your question. Yes. -Thadeus On Fri, Nov 27, 2009 at 10:11 PM,

[web2py:36108] Re: Customizing HTML output of forms

2009-11-27 Thread Julian Yap
Is SQLFORM.factory related to ORM or can it just run standalone for general form generation? On 11/27/09, Thadeus Burgess wrote: > What is wrong with using SQLFORM.factory? > > No, custom is a storage object that exists only within SQLFORM class. > > -Thadeus > > > > > On Fri, Nov 27, 2009 at 6:

[web2py:36107] Re: wsgi and http_authorization

2009-11-27 Thread Graham Dumpleton
On Nov 28, 9:40 am, olivier wrote: > I am using web2py build-in server for development and basic http auth > works fine! > However, when pushing the code on my server (on which my provider > propose to use wsgi...) it is not working anymore.  :-( > On the server, I checked the "request.env", "ht

Re: [web2py:36106] Re: SQLForm (set custom css classes to specified elements)

2009-11-27 Thread Thadeus Burgess
Try actually overriding the form widgets. So you can override SQLFORM.widgets dictionary with your custom ones that define your own classes. You can see example widgets on web2pyslices.com for this purpose. -Thadeus On Fri, Nov 27, 2009 at 7:35 PM, mdipierro wrote: > I am not sure this is

[web2py:36105] Re: Saving Session Variables via a Form

2009-11-27 Thread mdipierro
ERRATA: Do not use crud.form use instead form=SQLFORM(db.table) if FORM.accepts(form,request.vars): session.form_vars=form.vars On Nov 27, 7:36 pm, mdipierro wrote: > Do not use crud.form > > use instead > > form=SQLFORM(db.table) > if FORM.accepts(form,request.vars): >     session.form_va

[web2py:36104] Re: Saving Session Variables via a Form

2009-11-27 Thread mdipierro
Do not use crud.form use instead form=SQLFORM(db.table) if FORM.accepts(form,request.vars): session.form_vars=request.vars On Nov 27, 6:30 pm, johntynan wrote: > I have a question about saving the values from a crud form as session > variables (as opposed to updating a record in the datab

[web2py:36103] Re: SQLForm (set custom css classes to specified elements)

2009-11-27 Thread mdipierro
I am not sure this is a good idea. It is not necessary for the purpose of customization Moreover you can do it with jQuery jQuery('#table_password').addCladd('custom_1'); On Nov 27, 6:55 pm, waTR wrote: > I am wondering if anyone is working on adding a capability to set a > class for a single e

[web2py:36102] Re: Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread mdipierro
No because you do not know what the widget is. There is no fixed structure for a widget. On Nov 27, 6:32 pm, waTR wrote: > Is there any plan to allow people to modify individual classes of > individual elements in the future? > ie. > {{=form.custom.widget.notes(style_class="txtarea large")}} > >

[web2py:36101] Saving Session Variables via a Form

2009-11-27 Thread johntynan
I have a question about saving the values from a crud form as session variables (as opposed to updating a record in the database). Do you know where there might be a good example for doing this? To get started, I riffed off of the thread here: http://groups.google.com/group/web2py/browse_thread/

[web2py:36100] SQLForm (set custom css classes to specified elements)

2009-11-27 Thread waTR
I am wondering if anyone is working on adding a capability to set a class for a single element in an SQLForm.custom.widget out of however many are passed to it from a db.table. I.e. You have a table named USER with Name, Email, Password. Set Name to class = "password OR string OR whatever is defa

[web2py:36099] Re: Customizing HTML output of forms

2009-11-27 Thread Thadeus Burgess
What is wrong with using SQLFORM.factory? No, custom is a storage object that exists only within SQLFORM class. -Thadeus On Fri, Nov 27, 2009 at 6:09 PM, Julian Yap wrote: > Is it possible to use custom forms without SQLFORM according to my > original post requirements ? > > Thanks. > > On

Re: [web2py:36098] Re: Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread Thadeus Burgess
I've been wanting more customizable custom forms for a while, however not sure how they would be implemented, or what kind of custom is actually really needed beyond what is already here. -Thadeus On Fri, Nov 27, 2009 at 6:32 PM, waTR wrote: > Is there any plan to allow people to modify indi

[web2py:36097] Re: Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread waTR
Is there any plan to allow people to modify individual classes of individual elements in the future? ie. {{=form.custom.widget.notes(style_class="txtarea large")}} Would be really nice to have access to individual elements' style on an as needed basis. On Nov 27, 4:14 pm, waTR wrote: > that's

[web2py:36096] Re: Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread waTR
that's perfect! thank you T & M! On Nov 27, 3:56 pm, mdipierro wrote: > Not for each element (not without using jquery) but you can change the > class for the form > > form['_class']= > > and than use that to style the content. > > On Nov 27, 5:25 pm, waTR wrote: > > > Is there a way to ch

[web2py:36095] Re: Customizing HTML output of forms

2009-11-27 Thread Julian Yap
Is it possible to use custom forms without SQLFORM according to my original post requirements ? Thanks. On 11/27/09, Thadeus Burgess wrote: > tis only with SQLFORM or SQLFORM.factory. > > Pass the class to the form > > form = FORM(, _class="helloform") > > -Thadeus > > > > > On Fri, Nov 27,

[web2py:36094] Re: gae and nosql

2009-11-27 Thread mdipierro
db(...).select().find(lambda row: row.find('substring')>=0) will work as 'contains'. Mind this is exceuted at the webpy level not at the GAE level which does not support this. On Nov 27, 1:20 pm, vince wrote: > i've notice the new DAL do support a form of LIKE on GAE. > > anyone tried it and how

[web2py:36093] Re: auth custome login not working

2009-11-27 Thread mdipierro
Mind you can do: auth.settings.hmac_key='sha512:9562af3a-c7f5-4582-8322-b0efa4fe307b' the 'sha512:' is used if no digest_alg is passed to CRYPT. 'sha512:' is there by default in keys generated by admin. On Nov 27, 12:50 pm, waTR wrote: > SOLUTION: > > change sha512 -> md5. > > Not sure how or w

[web2py:36092] Re: url rewriting bug in rewrite.py still not fixed

2009-11-27 Thread mdipierro
OK, please give me couple of days. For now, for everybody else, paths in routes must start with /. On Nov 27, 4:52 pm, Wikus van de Merwe wrote: > Please run the test.py script attached in the bug tracker. It compares > the behaviour of the current trunk code (test_old) against the > expected be

[web2py:36091] Re: Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread mdipierro
Not for each element (not without using jquery) but you can change the class for the form form['_class']= and than use that to style the content. On Nov 27, 5:25 pm, waTR wrote: > Is there a way to change the default classes OR id of each element in > factory()? Or is there any other way >

[web2py:36090] Re: Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread waTR
Is there a way to change the default classes OR id of each element in factory()? Or is there any other way of achieving the above while assigning custom CSS classes to the form? On Nov 27, 3:05 pm, Thadeus Burgess wrote: > I'm sure the below is not everything you can accomplish with sqlform. Ho

[web2py:36089] Re: url rewriting bug in rewrite.py still not fixed

2009-11-27 Thread Wikus van de Merwe
Another example from this thread: http://groups.google.com/group/web2py/browse_thread/thread/a5c93e02e4f33a60. This simple pattern "^127\.0\.0\.1:.*" won't be rewritten unless you add the slash to make it "^127\.0\.0\.1:/.*". Isn't that confusing? -- You received this message because you are subs

Re: [web2py:36088] Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread Thadeus Burgess
I'm sure the below is not everything you can accomplish with sqlform. Hope this helps. myuser = db.auth_user[auth.user.id] SQLFORM.factory( Field('name', default=myuser.first_name), Field('lname', default=myuser.last_name), Field('email', default=myuser.email), Field('newpass1', 'password', requi

[web2py:36087] Looking to use form.custom with existing table and new data boxes

2009-11-27 Thread waTR
I am looking to create a user preferences + change password page. Summary: The page will list the user details i.e. name, email, etc. in input boxes (pre-filled with the info from the db). I want to be able to select which fields it decides to show, however, I don't want it to just spit out the wh

[web2py:36086] Re: url rewriting bug in rewrite.py still not fixed

2009-11-27 Thread Wikus van de Merwe
Please run the test.py script attached in the bug tracker. It compares the behaviour of the current trunk code (test_old) against the expected behaviour of the patched version (test_new) using the expression "(?!/init)(.+)/(.+)". The key thing is, that a path pattern is something different from a p

[web2py:36085] wsgi and http_authorization

2009-11-27 Thread olivier
I am using web2py build-in server for development and basic http auth works fine! However, when pushing the code on my server (on which my provider propose to use wsgi...) it is not working anymore. :-( On the server, I checked the "request.env", "http_authorization" is indeed missing. I confess

[web2py:36084] Re: Customizing HTML output of forms

2009-11-27 Thread Thadeus Burgess
tis only with SQLFORM or SQLFORM.factory. Pass the class to the form form = FORM(, _class="helloform") -Thadeus On Fri, Nov 27, 2009 at 4:37 PM, Julian Yap wrote: > When try this in the form: > {{=form.custom.widget.name}} > > I get this error: > AttributeError: 'FORM' object has no at

[web2py:36083] Re: Customizing HTML output of forms

2009-11-27 Thread Julian Yap
When try this in the form: {{=form.custom.widget.name}} I get this error: AttributeError: 'FORM' object has no attribute 'custom' On Nov 27, 5:12 am, Thadeus Burgess wrote: > custom form!!! FTW > > http://web2py.com/AlterEgo/default/show/205 > > I have that link memorized by now ;) > > -Thadeus

[web2py:36082] Re: Customizing HTML output of forms

2009-11-27 Thread waTR
Is it possible to manually set the class of the form so as to make it easier to customize with CSS? I can't see anything like that in any documentation. On Nov 27, 7:12 am, Thadeus Burgess wrote: > custom form!!! FTW > > http://web2py.com/AlterEgo/default/show/205 > > I have that link memoriz

[web2py:36081] Re: SQL Query with Case Statement...

2009-11-27 Thread Yannick
Thanks for the note Massimo, I did test what you suggested, but it's not working with no error or ticket generated ... I print the generated SQL query and it looks fine... I think DAL doesn't handle "Case"... Thanks anyway I'll used a work around solution... Cheers, Yannick P. On Nov 26, 8:27 am,

[web2py:36080] gae and nosql

2009-11-27 Thread vince
i've notice the new DAL do support a form of LIKE on GAE. anyone tried it and how's the performance? it seems to only support "startwith", what about "contain"? is there any experimental nosql database i can play with now besides GAE? -vince -- You received this message because you are subsc

[web2py:36079] Re: auth custome login not working

2009-11-27 Thread waTR
SOLUTION: change sha512 -> md5. Not sure how or why it got set to sha512... Has CRYPT() been changed from SHA512 to md5 recently? REVISED CODE: passwd = hmac.new(auth.settings.hmac_key, request.get_vars.password, hashlib.md5).hexdigest() On Nov 27, 10:33 am, waTR wrote: > I am trying to get

[web2py:36078] auth custome login not working

2009-11-27 Thread waTR
I am trying to get a custome login to work with auth. Here is my code: auth.settings.hmac_key='9562af3a-c7f5-4582-8322-b0efa4fe307b' SQLField("password", 'password', readable=False, label='Password', requires=CRYPT(key=auth.settings.hmac_key)), passwd = hmac.new(auth.settings.hmac_key, request.get_

[web2py:36077] Re: multiple validations problem

2009-11-27 Thread mdipierro
If a validator has a method set_self_id, it is called automatically by web2py upon edit. On Nov 27, 10:22 am, __Kyo__ wrote: > Hi thanks a lot for the help, i put this code in my model, and it runs > fine. > > inventory=db().select(db.Inventory.ALL) > for i in inventory: >     if db((i.idProduc

[web2py:36076] Re: multiple validations problem

2009-11-27 Thread __Kyo__
Hi thanks a lot for the help, i put this code in my model, and it runs fine. inventory=db().select(db.Inventory.ALL) for i in inventory: if db((i.idProducto==db.Inventory.idProduct)& (i.idCountry==db.Inventory.idCountry)).count()>1: db(db.Inventory.id == i.id).delete() However I'd lik

[web2py:36075] New features not documented in book 2 ed.

2009-11-27 Thread DenesL
New features not documented in Book 2nd edition 1.73.1 * New decimal field type, as discussed in http://groups.google.com/group/web2py/browse_thread/thread/3c1957d8ed743513 * New IS_DECIMAL_IN_RANGE validator * Experimental support for non UTF8 encoding in DB * T.current_languages default to 'en'

Re: [web2py:36074] Customizing HTML output of forms

2009-11-27 Thread Thadeus Burgess
custom form!!! FTW http://web2py.com/AlterEgo/default/show/205 I have that link memorized by now ;) -Thadeus On Fri, Nov 27, 2009 at 4:08 AM, Julian Yap wrote: > When using {{=form}} in views, I want to customize the output so it's > more tabular. Right now, the output all just flows on o

[web2py:36073] web2py help & resources

2009-11-27 Thread DenesL
Primary source of help: web2py groups - http://groups.google.com/group/web2py/topics http://groups.google.com/group/web2py-developers/topics http://groups.google.com/group/web2py-users-brazil/topics Tips on searching the users group -

[web2py:36072] Re: Routes

2009-11-27 Thread kbochert
On Nov 26, 11:05 am, kbochert wrote: > On Nov 26, 10:36 am, mdipierro wrote: > > > technically you can reload routes without restarting. From the admin > > web based shell > > > from gluon.rewrite improt * > > load() > > > On Nov 26, 12:02 pm, Yarko Tymciurak > > wrote: > > > > routes.py is re

[web2py:36071] Customizing HTML output of forms

2009-11-27 Thread Julian Yap
When using {{=form}} in views, I want to customize the output so it's more tabular. Right now, the output all just flows on one line. Example controller: def form1(): form = FORM('Name: ', INPUT(_name='name', value=session.name), 'To Address: ', INPUT(_name='to_address', requires=

[web2py:36070] Re: expire login when browser closes

2009-11-27 Thread KMax
logout ? On 27 ноя, 00:54, vince wrote: > it will expire when browser close on firefox/safari. however, if you > just close the tab the session won't expire. is there any workaround > for this problem? -- You received this message because you are subscribed to the Google Groups "web2py-users"