[web2py:35420] Re: db.py error

2009-11-16 Thread blye
Done and styling now! Web2py is AWESOME! and still in its infancy. Congratulations to new luminaries in Python pantheon. To paraphrase Tim Peters zen and the art of internet maintenance I am working towards using web2py and google chrome in its "closed" mode. Any links on this i/f are welcome.

[web2py:35421] Re: Working with NoSQLs?

2009-11-16 Thread mdipierro
The DAL supports GAE. I would like to add support to MongoDB. You can already use any NODB but you have to use their native API instead of the web2py database abstraction layer. Any reason to give a preference to CouchDB over MongoDB? Massimo On Nov 15, 8:49 pm, David Mitchell wrote: > Hello e

[web2py:35422] Re: customizing auth_user

2009-11-16 Thread mdipierro
You need: auth.user_id.requires = IS_IN_DB(db, 'auth_user.id', '%(id)s') I am hesitant to make this the default. I think it is usefult to see the actual name of the user in the dropdown (current default) On Nov 15, 9:29 pm, Wiiboy wrote: > Ahh, on trying to DB-Admin the table auth_membership,

[web2py:35423] Re: Multiple requires IS_IN_DB dropdown filter

2009-11-16 Thread mdipierro
requires=IS_IN_DB(db(db.table.field.like ('%.dat')),'field_val','represented_by') will not work on GAE On Nov 15, 10:28 pm, rondevu wrote: > I am trying to create a dropdown using SQLFORM.factory using > requires=IS_IN_DB(db,'field_val','represented_by') validator. I need > to create a dropdow

[web2py:35424] Re: db.py error

2009-11-16 Thread mdipierro
thanks. keep us posted. On Nov 16, 2:14 am, blye wrote: > Done and styling now! > Web2py is AWESOME! and still in its infancy. > > Congratulations to new luminaries in Python pantheon. > To paraphrase Tim Peters > zen and the art of internet maintenance > > I am working towards using web2py and

[web2py:35425] Re: Something wrong with MySQL. (possible bug?)

2009-11-16 Thread Benigno
Massimo, It is working now. I am not sure what could be the cause, as I have not changed anything in db.py. What I have done differently is delete databases/ and errors/ reload apache, and chowned all the files to www-data. As for the db, it only had the Auth tables (with no modifications)

[web2py:35426] Re: Multiple requires IS_IN_DB dropdown filter

2009-11-16 Thread rondevu
I'm getting this error. File "C:\web2py\gluon\validators.py", line 330, in build_set if self.dbset._db._dbname != 'gql': AttributeError: 'Query' object has no attribute '_db' On Nov 16, 4:29 pm, mdipierro wrote: > requires=IS_IN_DB(db(db.table.field.like > ('%.dat')),'field_val','represe

[web2py:35427] Re: Replace html with {{=CODE(src, language=lang)}} for syntax highlighting

2009-11-16 Thread Mengu
i don't like wysiwyg editors but i love markdown :) On Nov 16, 1:13 am, Thadeus Burgess wrote: > Lol, yes :) > -Thadeus > > On Sun, Nov 15, 2009 at 3:59 PM, mr.freeze wrote: > > > Do you mean this one? > >http://www.web2pyslices.com/main/slices/take_slice/32 > > > On Nov 15, 3:55 pm, Thadeus Bu

[web2py:35428] crud forms and layout

2009-11-16 Thread Marco Prosperi
hi all, I would like to use the crud forms (for their simplicity) for a table with a lot of fields. The problem is that the standard layout positions fields one above the other leaving the right half of my screen empty (a waste of room) and the submit button very far from the top of the page for t

[web2py:35429] Re: new on web2pyslices.com: concurrent RPX and web2py auth

2009-11-16 Thread murray3
Mr Freeze, thanks for this, I am trying to get it to work but seem to have a problem when the iframe choose provider popup displays it does not recognise the rpxnow.com url: Server not found Firefox can't find the server at rpxnow.com. in the controller I have pasted yoiur code as per "slice

[web2py:35430] Re: new on web2pyslices.com: concurrent RPX and web2py auth

2009-11-16 Thread mr.freeze
The realm is the what you named your application on rpxnow.com: https://[your_realm].rpxnow.com/openid/embed?token_url=your_token_url The token_url is where they send the token after logging in at the respective provider. You would change it from localhost to your production URL when you deploy

[web2py:35431] validations

2009-11-16 Thread Sophie
Hi In my database i have a number field i have somethig like this db.define_table("Inventory", Field("idProduct", db.Product, label="Product"), Field("quantity", "integer", default=None, label="Quantity")) db.Inventory.idProduct.requires=IS_IN_DB( db, 'Product.id', ' % (nProduct)s ') If i want

[web2py:35432] Re: a slice from the maestro himself: ubuntu deployment script

2009-11-16 Thread David
Ty for the custom script. I am running it on a VPS at the moment. It looks to be running quite well. Thank you, David :0) On Nov 14, 7:03 am, Alex Fanjul wrote: > Nice Massimo, so the problem was the port, I didnt realize... > thanks > > El 13/11/09 21:04, mdipierro escribió: > > > > > > > Wh

[web2py:35433] Re: ajax standard forms

2009-11-16 Thread Wes James
the focus line sets the focus to the first input field the ajax line is supposed to go get some data and put it in the register DIV, but the way I had it in the email will not work since the controller will return a form object and I think the ajax() will want just plain html to push in to the reg

[web2py:35434] Re: validations

2009-11-16 Thread Fran
On Nov 16, 3:21 pm, Sophie wrote: > In my database i have a number field i have somethig like this > db.define_table("Inventory", > Field("idProduct", db.Product, label="Product"), > Field("quantity", "integer", default=None, label="Quantity")) > db.Inventory.idProduct.requires=IS_IN_DB( db, 'Pro

[web2py:35435] Re: validations

2009-11-16 Thread Fran
On Nov 16, 3:21 pm, Sophie wrote: > Other validation i have problem is inserting states > db.define_table("State", > Field("idCountry", db.Country, label="Country"), > Field("nState", "string", default=None, label="State", notnull=True, > ondelete='CASCADE')) > I cant put is_not_in_db() in nState

[web2py:35436] Re: decimal type in web2py

2009-11-16 Thread DenesL
DB2/400 also tested OK. Notes: 1) Was able to access keyed table with PACKED numeric field as decimal. 2) New non-keyed table created decimal fields as ZONED. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-

[web2py:35437] does not send mail me

2009-11-16 Thread tushar patel
does not send mail me --~--~-~--~~~---~--~~ 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+unsubscr..

[web2py:35438] Re: Something wrong with MySQL. (possible bug?)

2009-11-16 Thread Thadeus Burgess
It was the permissions on the filesystem. Reloading apache can do wonders too :) -Thadeus On Mon, Nov 16, 2009 at 3:04 AM, Benigno wrote: > > Massimo, > >It is working now. I am not sure what could be the cause, as I > have not changed anything in db.py. What I have done differently is

[web2py:35439] Re: crud forms and layout

2009-11-16 Thread Thadeus Burgess
Use custom form http://web2py.com/AlterEgo/default/show/205 -Thadeus On Mon, Nov 16, 2009 at 5:52 AM, Marco Prosperi wrote: > > hi all, I would like to use the crud forms (for their simplicity) for > a table with a lot of fields. The problem is that the standard layout > positions fields one

[web2py:35440] Re: Multiple requires IS_IN_DB dropdown filter

2009-11-16 Thread mdipierro
You typed requires=IS_IN_DB(db.table.field.like ('%.dat'),'field_val','represented_by') #incorrect! instead of requires=IS_IN_DB(db(db.table.field.like ('%.dat')),'field_val','represented_by') On Nov 16, 3:44 am, rondevu wrote: > I'm getting this error. > >   File "C:\web2py\gluon\validators

[web2py:35441] Re: crud forms and layout

2009-11-16 Thread mdipierro
form is the form form[0] is the table form[0][1] is the first row etc. I think something like this does what you aksed: n_fields = len(form[0].components) bottom_half = form[0].components[n_fields/2:0] form[0].components[n_fields/2:] form[0]=TABLE(TR(TD(form[0]),TD(TABLE(bottom_half Try I a

[web2py:35442] Re: decimal type in web2py

2009-11-16 Thread mdipierro
can you explain more. I do not understand. On Nov 16, 10:34 am, DenesL wrote: > DB2/400 also tested OK. > Notes: > 1) Was able to access keyed table with PACKED numeric field as > decimal. > 2) New non-keyed table created decimal fields as ZONED. --~--~-~--~~~---~--~-

[web2py:35443] Re: decimal type in web2py

2009-11-16 Thread DenesL
It is not a problem. I am just recording my observations for future reference. Note 1 says that you can access packed decimal fields with the new decimal type (they can also be accessed as double, the driver handles the conversion). Note 2 says what happens when it creates a new table, decimal fi

[web2py:35444] Re: Working with NoSQLs?

2009-11-16 Thread Douglas Soares de Andrade
Em Mon, 16 Nov 2009 00:23:52 -0800 (PST) mdipierro escreveu: > > The DAL supports GAE. I would like to add support to MongoDB. You can > already use any NODB but you have to use their native API instead of > the web2py database abstraction layer. > > Any reason to give a preference to CouchDB

[web2py:35445] Re: decimal type in web2py

2009-11-16 Thread mdipierro
are "packed" and "zoned" field types in db2? what is the difference? On Nov 16, 11:07 am, DenesL wrote: > It is not a problem. > I am just recording my observations for future reference. > > Note 1 says that you can access packed decimal fields with the new > decimal type (they can also be acces

[web2py:35446] Re: decimal type in web2py

2009-11-16 Thread DenesL
Yes. Zoned: 1 digit per byte Packed: 2 digits per byte http://books.google.ca/books?id=elh8ydHWtTYC&pg=PA143 On Nov 16, 1:26 pm, mdipierro wrote: > are "packed" and "zoned" field types in db2? what is the difference? > > On Nov 16, 11:07 am, DenesL wrote: > > > It is not a problem. > > I am j

[web2py:35447] Re: Working with NoSQLs?

2009-11-16 Thread David Mitchell
Thanks for the reply Massimo, The main reason I've used CouchDB to date was that it was the first of this class of databases that I stumbled upon. I've found it extremely powerful and a good fit for what I was doing, but it may be that others such as MongoDB are as good or better - I simply found

[web2py:35448] scaling web2py (web2pyslice)

2009-11-16 Thread mdipierro
I just tried this and i worked great: http://www.web2pyslices.com/main/slices/take_slice/33 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegrou

[web2py:35449] Re: scaling web2py (web2pyslice)

2009-11-16 Thread Thadeus Burgess
Are the web2py instances running on their own apache instance? Or just the web2py built in server? -Thadeus On Mon, Nov 16, 2009 at 1:43 PM, mdipierro wrote: > > I just tried this and i worked great: > > http://www.web2pyslices.com/main/slices/take_slice/33 > > > --~--~-~--~~---

[web2py:35450] SQLFORM.factory and edit forms

2009-11-16 Thread Dmitri Zagidulin
The setup: I'm working on a 3-step editing wizard, so, 3 pages with a form on each page. The navigation between the pages is done via Next and Previous submit buttons. When you go from page 1 to page 2, the contents of the form on page 1 are stored in the session. All 3 pages are written to the da

[web2py:35451] Re: SQLFORM.factory and edit forms

2009-11-16 Thread mr.freeze
Try using the 'default' attribute of SQLFORM to set the value to your session value. Something like this: def index(): form = SQLFORM.factory(Field('test1',default=session.test1), Field('test2',default=session.test2), submit_button="Next"

[web2py:35452] Re: scaling web2py (web2pyslice)

2009-11-16 Thread mdipierro
You do not need apache for the worker nodes. You can but would not but you much. On Nov 16, 1:59 pm, Thadeus Burgess wrote: > Are the web2py instances running on their own apache instance? Or just the > web2py built in server? > > -Thadeus > > On Mon, Nov 16, 2009 at 1:43 PM, mdipierro wrote: >

[web2py:35453] Re: SQLFORM.factory and edit forms

2009-11-16 Thread Dmitri Zagidulin
Ah, ok! Makes sense, I'll try that. But there aren't any form dictionaries of values that I can update, right? Something like: form.custom.fieldvalues.update(session.myrecord) ? On Nov 16, 4:48 pm, "mr.freeze" wrote: > Try using the 'default' attribute of SQLFORM to set the value to your > ses

[web2py:35454] Re: SQLFORM.factory and edit forms

2009-11-16 Thread mr.freeze
There are two nifty functions for this: DIV.element and DIV.elements. Building on the example above, you can grab and modify all text inputs like this: inputs = form.elements("input",type="_text") for inp in inputs: inp['_whatever'] = session.whatever On Nov 16, 4:01 pm, Dmitri Zagidulin w

[web2py:35455] Re: SQLFORM.factory and edit forms

2009-11-16 Thread mr.freeze
Sorry, inp['_value'] = session.whatever On Nov 16, 4:20 pm, "mr.freeze" wrote: > There are two nifty functions for this: DIV.element and DIV.elements. > Building on the example above, you can grab and modify all text inputs > like this: > > inputs = form.elements("input",type="_text") > for inp

[web2py:35456] Re: SQLFORM.factory and edit forms

2009-11-16 Thread Dmitri Zagidulin
Perfect! That's the kind of thing I was looking for, thanks! On Nov 16, 5:23 pm, "mr.freeze" wrote: > Sorry, inp['_value'] = session.whatever > > On Nov 16, 4:20 pm, "mr.freeze" wrote: > > > There are two nifty functions for this: DIV.element and DIV.elements. > > Building on the example above,

[web2py:35457] Re: Working with NoSQLs?

2009-11-16 Thread David Mitchell
OK, I've found one big plus of MongoDB vs. CouchDB. It looks fairly straightforward to run MongoDB from a USB key, whereas it's pretty painful to do so with CouchDB. As I frequently move stuff between multiple workplaces, that's a very big tick for me. Regards Dave M. 2009/11/17 David Mitchell

[web2py:35458] Re: scaling web2py (web2pyslice)

2009-11-16 Thread Thadeus Burgess
So... They are running on web2py's internal server? Wouldn't it be more beneficial to run them all apache/mod_wsgi? -Thadeus On Mon, Nov 16, 2009 at 3:53 PM, mdipierro wrote: > > You do not need apache for the worker nodes. You can but would not but > you much. > > On Nov 16, 1:59 pm, Thade

[web2py:35459] Re: better flash css?

2009-11-16 Thread Christopher Steel
Thanks!, I found these resources during my accessibility research, WAI-ARIA seems to be "the standard" for the moment, Google is currently using it experimentally for all search results, a free plugin (manual install, but seems to work great) for Firefox called Fire Vox is available. ARIA I

[web2py:35460] Re: Multiple requires IS_IN_DB dropdown filter

2009-11-16 Thread rondevu
oops, didnt notice that... thanks a lot! On Nov 17, 12:39 am, mdipierro wrote: > You typed > > requires=IS_IN_DB(db.table.field.like > ('%.dat'),'field_val','represented_by')  #incorrect! > > instead of > > requires=IS_IN_DB(db(db.table.field.like > ('%.dat')),'field_val','represented_by') > > O

[web2py:35461] Re: scaling web2py (web2pyslice)

2009-11-16 Thread Kuba Kucharski
just to clarify this > You can but would not ?help > you much. I'm sorry if I guess wrong what you try to say this seems to be a problem with an internal server for production environments http://groups.google.com/group/web2py/browse_thread/thread/57361bcd71a80c4a/b2c91dc1edaf7f72?lnk=raot&pli=1

[web2py:35462] Custom checkboxes widget

2009-11-16 Thread Thadeus Burgess
What is special about the SQLFORM.widgets.checkboxes.widget that makes web2py process the data into a string of pipe separated integers? multiple=True It seems in my custom implementation of a checkboxes widget, will allow you to post multiple, however it stores the data as the actual list. I am

[web2py:35463] Re: scaling web2py (web2pyslice)

2009-11-16 Thread mdipierro
This is a complicated matter. Who does ssl? The worker nodes or the same server that does load balancing? In the former case you need to use apache but you also need to a way to create sticky sessions based not on cookie but on client it. On Nov 16, 8:41 pm, Kuba Kucharski wrote: > just to clari

[web2py:35464] Re: scaling web2py (web2pyslice)

2009-11-16 Thread Graham Dumpleton
On Nov 17, 8:53 am, mdipierro wrote: > You do not need apache for the worker nodes. You can but would not but > you much. It would if you also have static files and are trying to serve it via same infrastructure. Even Apache would be better at serving static files than builtin server. Because

[web2py:35465] Re: Custom checkboxes widget

2009-11-16 Thread mdipierro
Multiple stores data as '|1|3|45|' because this is easy to parse unambiguously using like '%|3|%'. On Nov 16, 9:27 pm, Thadeus Burgess wrote: > What is special about the SQLFORM.widgets.checkboxes.widget that makes > web2py process the data into a string of pipe separated integers? > multiple=Tr

[web2py:35466] Date default now()

2009-11-16 Thread David
Hey guys, What is the trick to get web2py to insert the time automatically for something like "last_modified" so I don't have to manually pick the time when creating the records? I've got "Field('last_modified', 'datetime', default=request.now) but it still says I need to pick a time. Thanks, D

[web2py:35467] Re: Date default now()

2009-11-16 Thread mdipierro
Field(...,default=request.now,writable=False,readable=False) also add update=request.now if you want the timestamp to change every time the record is updated. On Nov 16, 11:41 pm, David wrote: > Hey guys, > > What is the trick to get web2py to insert the time automatically for > somethi

[web2py:35468] Re: Custom checkboxes widget

2009-11-16 Thread Thadeus Burgess
I can't get my custom checkboxes widget to parse the data like |1|3|45| that is the problem. It displays correctly, and the SQLFORM will accept it, but it stores it wrong. -Thadeus On Mon, Nov 16, 2009 at 11:38 PM, mdipierro wrote: > > Multiple stores data as '|1|3|45|' because this is easy

[web2py:35469] Re: Date default now()

2009-11-16 Thread David
Ok I've added those entries and now it looks like this Field('last_modified', 'datetime', default=request.now, update=request.now, writable=False, readable=False) and gives this when I try to submit without putting a date in it in the admin screen flash -> enter date and time as 1963-08-28 14:3

[web2py:35470] Book finally on Amazon

2009-11-16 Thread mdipierro
http://www.amazon.com/Web2Py-Manual-Wiley-Desktop-Editions/dp/0470592354 --~--~-~--~~~---~--~~ 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 unsubscrib

[web2py:35471] Re: Date default now()

2009-11-16 Thread mdipierro
Wait. The appadmin interface ignores writable and readable. When you make your own form it will work as you expect. Massimo On Nov 17, 12:17 am, David wrote: > Ok I've added those entries and now it looks like this > > Field('last_modified', 'datetime', default=request.now, > update=request.no

[web2py:35472] Re: scaling web2py (web2pyslice)

2009-11-16 Thread mdipierro
Good point. I agree. On Nov 16, 11:37 pm, Graham Dumpleton wrote: > On Nov 17, 8:53 am, mdipierro wrote: > > > You do not need apache for the worker nodes. You can but would not but > > you much. > > It would if you also have static files and are trying to serve it via > same infrastructure. Ev