Re: [web2py] Accessing extra sqlform elements from view

2012-06-06 Thread Cornelius Kölbel
Hello Rahul, I think you should be able to access it as form.vars.agree which would either be "on" or None. Kind regards Cornelius Am 06.06.2012 13:45, schrieb rahulserver: > I added this extra element to my sqlform (as given in web2py book > chapter forms and validators): > form = SQLFORM

[web2py] Multiple buttons in links of smartgrid

2012-06-07 Thread Cornelius Kölbel
Hi, is it possible to add more than one button to a SQLFORM.smartgrid? At the moment I would add one button like this...| links = [lambda row: A(T('Add a contact to this customer'),_href=URL("customer","add_contact",args=[row.id]))] |Thanks a lot and kind regards CorneliusKölbel signature.a

Re: [web2py] Multiple buttons in links of smartgrid

2012-06-07 Thread Cornelius Kölbel
Am 07.06.2012 12:46, schrieb Johann Spies: > On 7 June 2012 11:01, Cornelius Kölbel <mailto:cornelius.koel...@lsexperts.de>> wrote: > > Hi, > is it possible to add more than one button to a SQLFORM.smartgrid? > > Yes. > > > At the mom

[web2py] access db and settings from modules

2012-06-10 Thread Cornelius Kölbel
Hello, I want to push several functionalities to some modules. I am wondering if there is a more elegant way to make the db and settings objects usable in the modules. I could pass them as parameters. But is there another way to access those objects in the modules code? (I know that e.g. pylons al

Re: [web2py] From Web2py to executable app

2012-06-10 Thread Cornelius Kölbel
"Independent GUI"? Are you thinking of something like PyGTK? I very much doubt that this is possible. Kind regards Cornelius Am 10.06.2012 12:56, schrieb miroslavgojic: > Is it possible to write web2py application and after that convert to > independent GUI executable application. > Or I need to

[web2py] wider columns in smartgrid

2012-06-10 Thread Cornelius Kölbel
Hi, I got a question about the smartgrid. I'd like to set the width of the columns to a bigger value. My grid has 13 columns, which get scrolled. This is fine. But the width is very narrow resulting in line breaks I do not want to have. Especially the link break in the column with the buttons to t

Re: [web2py] Re: access db and settings from modules

2012-06-11 Thread Cornelius Kölbel
Thanks for the current hint. Kind regards Cornelius Am 11.06.2012 01:59, schrieb howesc: > from gluon.globals import current > > > current has request, response, auth set automatically. you can store > things in current (it is a Storage object). It has been recommended > that if you add things t

[web2py] naming convention of download files

2012-06-11 Thread Cornelius Kölbel
Hello, my application is generating pdfs which should be available via the normal web2py download controller. I realize, that the file in the uploads/-directory is named like: pdf But what is the something? OK, it does not seem to matter, if I set it to anything, but I'd like to stick to

Re: [web2py] Re: naming convention of download files

2012-06-11 Thread Cornelius Kölbel
Am 11.06.2012 19:19, schrieb Anthony: > > my application is generating pdfs which should be available via the > normal web2py download controller. > I realize, that the file in the uploads/-directory is named like: > > > pdf > > But what is the something? > > > Look

Re: [web2py] Re: naming convention of download files

2012-06-11 Thread Cornelius Kölbel
Am 11.06.2012 21:26, schrieb Anthony: > > hm, so the uuid seems to be there to take into account, that > multiple files with the same filename might be uploaded. That > makes sense, exspecially if not all files README.txt have the same > content. > > > If the filename is very long

[web2py] SQLFORM.grid with links in columns

2012-06-13 Thread Cornelius Kölbel
Hi there, I think I found a missing feature and thus got a feature request for the sqlform.grid und thus for the sqlform. I tried to take a look into the code and I think it is not possible. I am using version 1.99.7. I'd like to a a link to any abitrary column. Let's say I got a table | head1 |

[web2py] restrict the available choices in a dropdown in sqlform

2012-06-16 Thread Cornelius Kölbel
Hello, I am wondering how I can restrict the available choices in the dropdown box of a form. I got a table defined like this. This table links auth_users to customers. db.define_table('t_customer_contact', Field('f_customer', db.t_customer, label=T("customer")),

Re: [web2py] Re: restrict the available choices in a dropdown in sqlform

2012-06-16 Thread Cornelius Kölbel
Am 16.06.2012 22:30, schrieb Anthony: > Reference fields automatically get an IS_IN_DB validator, but you can > explicitly specify your own and pass a DAL Set as the first argument > to filter the auth_user records: > > || > db.define_table('t_customer_contact', > Field('f_customer',db.t_custo

Re: [web2py] Re: restrict the available choices in a dropdown in sqlform

2012-06-17 Thread Cornelius Kölbel
Am 17.06.2012 02:07, schrieb Anthony: > > I will not see the f_contact as a name anymore but only as the ids. > When I remove the requires from the table definition the ids are > resolved to the names again. > > > Sorry, I forgot -- for reference fields, if you don't specify any > val

Re: [web2py] Users Poll: To keep the button look for the welcome app's auth options, or not ?

2012-06-17 Thread Cornelius Kölbel
As the menu usually also has no button look I also vote b.1 Am 17.06.2012 05:30, schrieb Andrew: > A week or two ago a change was made to the nav bar to give the auth > buttons for Login, Register, etc a button look. This was part of > the fix to the dropdown menus to get them to work with bo

Re: [web2py] csv button

2012-06-17 Thread Cornelius Kölbel
Hi, in the SQLFORM.grid you can have an csv=True (default), that displays an export button, which will export to csv. form = SQLFORM.grid(db.t_product_license, onupdate=auth.archive, fields=[ ... ],

[web2py] translation does not translate

2012-07-07 Thread Cornelius Kölbel
Hi there, I am using web2py 1.99.7. It seems that my translation does not seem to work. I updated the translations, saw my added text, translated it to german, checked the browser for preferred language but still see the enflish words. How could I start here to solve my issue? Thanks a lot and k

[web2py] using db, auth and request objects in modules

2012-07-08 Thread Cornelius Kölbel
Hi, I think I am missing some of the major concepts of web2py. By some_magic^TM is got some object like "db", "request" and "auth" available in all my controllers. I think these are setup in db.py. Anyway, still strange for me. What would I need to do, when I want to make these available in some

Re: [web2py] Re: using db, auth and request objects in modules

2012-07-08 Thread Cornelius Kölbel
Hello Anthony, ok, now I got it. I also added some more objects to the current object in db.py and thus got rid of some parameters. Thanks and kind regards Cornelius Am 08.07.2012 15:15, schrieb Anthony: > Models, controllers, and views are executed in an environment that > includes all the web2

Re: [web2py] Re: translation does not translate

2012-07-08 Thread Cornelius Kölbel
Hello Massimo, thanks for the hint. The trunk works right away. Do you need me to run some test to be able to give you more detailed feedback? Kind regards Cornelius Am 08.07.2012 15:20, schrieb Massimo Di Pierro: > Could you please check using trunk which has a smarter language > detection? > T