[web2py] fadeOut response.flash

2012-12-20 Thread Johann Spies
When I log in the flash telling me that I am logged in does not timeout until I close it. I want it to fade out after a period - say two seconds. I have no clarity on how to change this behaviour in web2py.js. How do get the flash to fade out and set the timeout? Regards Johann -- Because

Re: [web2py] Re: No module named plural_rules, end emtpy db in DAL connection

2012-12-20 Thread Kostas M
The same warning appears: In [1]: from gluon.dal import DAL,Field WARNING:root:Unable to import plural rules: No module named plural_rules --

[web2py] widgets.checkboxes.widget INPUT inside LABLE

2012-12-20 Thread KMax
Hello, Using this widget=SQLFORM.widgets.checkboxes.widget for list of values gives the following html code: input id=some1 name=something type=checkbox value=1 / label for=some1Option1/label input id=some2 name=something type=checkbox value=2 / label for=some2Option2/label While if INPUT

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-20 Thread Niphlod
perfect, Ccing Massimo on this final one. Il giorno giovedì 20 dicembre 2012 00:16:25 UTC+1, Paolo ha scritto: Hi I was trying with the script that comes with the stable web2py. with the one on dropbox I problem has gone. Paolo 2012/12/19 Niphlod nip...@gmail.com javascript:

[web2py] Re: web3py?

2012-12-20 Thread Arnon Marcus
Cool (!) Do the HTML helpers support HTML5's data-* attributes? Can that be used for javascriupt frameworks like Knockout.js or Angular.js ? --

[web2py] ABS function inside DAL query

2012-12-20 Thread Pradeeshnarayan
In my web2py DAL query I want to calculate the absolute minimum value of a field. I am trying to convert this sql query to DAL (mysql database) select MIN(ABS(field2)) from tbl_table where field1='abc'; I have tried like below, but not correct result =

[web2py] how to decorate a function without using auth?

2012-12-20 Thread António Ramos
hello i have a function to be acessed only by users with an extra field F1 set to F how to protect this function to not be used bu everyone? what is the best way? thank you António --

Re: [web2py] Re: help please

2012-12-20 Thread Aurelijus
yeah.. backup backup backup.. it's just that sometimes you forget to :( Would it be wise to add some backup module to web2py admin? It could default to 1 copy per day or smthing simillar. It would especially serve Noobs :) On Thu, Dec 20, 2012 at 12:27 AM, Derek sp1d...@gmail.com wrote: The

[web2py] Beware auth.enable_record_versioning

2012-12-20 Thread Cliff Kachinske
I just discovered that auth.enable_record_versioning will create archive tables for the archive tables if turned off and turned back on. Not acceptable. --

[web2py] Re: fadeOut response.flash

2012-12-20 Thread Paolo Caruccio
Maybe you'll find this discussionhttps://groups.google.com/d/topic/web2py/xXGAGZvLDzo/discussion useful. Il giorno giovedì 20 dicembre 2012 09:36:25 UTC+1, Johann Spies ha scritto: When I log in the flash telling me that I am logged in does not timeout until I close it. I want it to fade

Re: [web2py] Re: web2py 2.3.2 added + - to some form elements

2012-12-20 Thread Daniele
Hmm I'm not sure how to open a ticket in google...sorry ~_~ On Dec 20, 2012, at 6:48 AM, howesc how...@umich.edu wrote: ooops. i added the - and didn't test the only 1 row case. i'll try and create a patch tomorrow for it. mind opening a ticket in google code? thanks, christian

Re: [web2py] Re: web2py 2.3.2 added + - to some form elements

2012-12-20 Thread Paolo Caruccio
http://code.google.com/p/web2py/issues/list Il giorno giovedì 20 dicembre 2012 15:31:56 UTC+1, Daniele ha scritto: Hmm I'm not sure how to open a ticket in google...sorry ~_~ On Dec 20, 2012, at 6:48 AM, howesc how...@umich.edu javascript: wrote: ooops. i added the - and didn't test

[web2py] Re: fadeOut response.flash

2012-12-20 Thread weheh
Look at the js named web2py.js which comes with the scaffolding. The flash function does not fadeout after time. You can add a function to this file (or modify the flash function) to timeout and fadeOut your flash as you choose. On Thursday, December 20, 2012 4:36:25 PM UTC+8, Johann Spies

Re: [web2py] Re: No module named plural_rules, end emtpy db in DAL connection

2012-12-20 Thread Massimo Di Pierro
I will check this. Anyway, the warning is not a problem. It is just trying to import some pluralization libraries and does not find them in path. They are not used by the DAL anyway. On Thursday, 20 December 2012 02:52:17 UTC-6, Kostas M wrote: The same warning appears: In [1]: from

[web2py] Re: widgets.checkboxes.widget INPUT inside LABLE

2012-12-20 Thread Massimo Di Pierro
I am not convinced this is the right fix. Does bootstrap suggest this? I do not think the input should be in the label. Perhaps there is an alternative fix using css? On Thursday, 20 December 2012 03:08:01 UTC-6, KMax wrote: Hello, Using this widget=SQLFORM.widgets.checkboxes.widget for

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-20 Thread Massimo Di Pierro
please email me the patch of latest file when ready for inclusion. On Thursday, 20 December 2012 03:18:20 UTC-6, Niphlod wrote: perfect, Ccing Massimo on this final one. Il giorno giovedì 20 dicembre 2012 00:16:25 UTC+1, Paolo ha scritto: Hi I was trying with the script that comes with the

[web2py] Re: web3py?

2012-12-20 Thread Massimo Di Pierro
They always did although the syntax is cumbersone DIV('content',**{'data-something':'something value'}) On Thursday, 20 December 2012 04:16:54 UTC-6, Arnon Marcus wrote: Cool (!) Do the HTML helpers support HTML5's data-* attributes? Can that be used for javascriupt frameworks like

[web2py] Re: ABS function inside DAL query

2012-12-20 Thread Massimo Di Pierro
OK. Ib trunk now: db().select(db.tbl_table.field2.abs().min()) On Thursday, 20 December 2012 05:20:15 UTC-6, Pradeeshnarayan wrote: In my web2py DAL query I want to calculate the absolute minimum value of a field. I am trying to convert this sql query to DAL (mysql database) select

[web2py] Re: how to decorate a function without using auth?

2012-12-20 Thread Massimo Di Pierro
@requires(auth.user.F1=='F') def yourfunction(...): On Thursday, 20 December 2012 06:40:09 UTC-6, Ramos wrote: hello i have a function to be acessed only by users with an extra field F1 set to F how to protect this function to not be used bu everyone? what is the best way? thank

[web2py] Re: Beware auth.enable_record_versioning

2012-12-20 Thread Massimo Di Pierro
I do not understand. Can you explain? On Thursday, 20 December 2012 08:11:42 UTC-6, Cliff Kachinske wrote: I just discovered that auth.enable_record_versioning will create archive tables for the archive tables if turned off and turned back on. Not acceptable. --

[web2py] Re: web2py 2.3.2 added + - to some form elements

2012-12-20 Thread Massimo Di Pierro
For now I have remove the - button. On Wednesday, 19 December 2012 23:48:37 UTC-6, howesc wrote: ooops. i added the - and didn't test the only 1 row case. i'll try and create a patch tomorrow for it. mind opening a ticket in google code? thanks, christian On Tuesday, December 18,

Re: [web2py] Re: The book updates and status

2012-12-20 Thread Johann Spies
On 19 December 2012 19:11, Massimo Di Pierro massimo.dipie...@gmail.comwrote: It would help me if people could add to this thread some comments about: - what needs clarification? The request I mentioned in an earlier message (

[web2py] Re: web3py?

2012-12-20 Thread Niphlod
correction, the _ in front is needed as always DIV('content',**{'_data-something':'something value'}) Il giorno giovedì 20 dicembre 2012 15:58:25 UTC+1, Massimo Di Pierro ha scritto: They always did although the syntax is cumbersone DIV('content',**{'data-something':'something value'})

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-20 Thread Massimo Di Pierro
Sorry I do not have a good solution at the moment. Can you open a ticket about this so we'll will not forget. For now you may want to consider creating a database view and selecting from the view. You would need to create a model (readonly) to access the view. On Wednesday, 19 December 2012

[web2py] Re: upload from Edit page

2012-12-20 Thread Massimo Di Pierro
Can you explain what you are trying to accomplish and what your models are? I do not understand from the code. On Tuesday, 18 December 2012 13:51:12 UTC-6, ArNew wrote: Hi Everyone, I need help urgently. In my application, I am have included upload fields in Create and edit page. Through

[web2py] Re: Login manually

2012-12-20 Thread Massimo Di Pierro
If your data is not confidential, any chance you send me your application? To me this looks like corrupted data in database as if the password field was at some pointed treated as type='list:string' and than changed back to type='password'. Is it possible? Massimo On Wednesday, 19 December

Re: [web2py] Re: The book updates and status

2012-12-20 Thread Massimo Di Pierro
Niphlod just did. We are working on merging the edits. It will be done today, together with lots of other edits. On Thursday, 20 December 2012 00:43:49 UTC-6, Johann Spies wrote: On 19 December 2012 19:11, Massimo Di Pierro massimo@gmail.comjavascript: wrote: It would help me if

[web2py] Re: web3py?

2012-12-20 Thread Massimo Di Pierro
Oops. right. I wish there was a simple syntax but I cannot think about one. On Thursday, 20 December 2012 09:07:21 UTC-6, Niphlod wrote: correction, the _ in front is needed as always DIV('content',**{'_data-something':'something value'}) Il giorno giovedì 20 dicembre 2012 15:58:25

Re: [web2py] Interesting - Brython (python to javascript)

2012-12-20 Thread Massimo Di Pierro
Looks like this is too limited to be useful. On Monday, 17 December 2012 01:08:41 UTC-6, viniciusban wrote: Brypthon doesn't support string interpolation, too. :-( On Sun, Dec 16, 2012 at 6:40 PM, Arnon Marcus a.m.m...@gmail.comjavascript: wrote: From what I saw, it does not support

Re: [web2py] Re: how to decorate a function without using auth?

2012-12-20 Thread António Ramos
extra fields are available in my auth.user var but they have None instead of the real value so i create an extra function def checkempreiteiro(user): print auth.user.isempreiteiro # *returns None* record=db(db.auth_user.id==user).select()[0] return record['isempreiteiro']

[web2py] Re: how to decorate a function without using auth?

2012-12-20 Thread Anthony
Note, should be @auth.requires(...). Anthony On Thursday, December 20, 2012 10:04:26 AM UTC-5, Massimo Di Pierro wrote: @requires(auth.user.F1=='F') def yourfunction(...): On Thursday, 20 December 2012 06:40:09 UTC-6, Ramos wrote: hello i have a function to be acessed only by users

[web2py] Re: fadeOut response.flash

2012-12-20 Thread Paolo Caruccio
If you are interested you could add this code: var flashBox = jQuery(.flash), flashTimer; flashBox.click(function(){ if (flashTimer) clearTimeout(flashTimer); flashBox.fadeOut(400, function(){jQuery(.flash).html('')}); }); flashTimer =

[web2py] Re: The book updates and status

2012-12-20 Thread Massimo Di Pierro
This is in: http://web2py.com/books/default/chapter/29/07?search=SQLFORM.grid#SQLFORM.grid-and-SQLFORM.smartgrid along with tons of other additions. :-) I hope to make a first pdf draft by the end of next week. Massimo On Wednesday, 19 December 2012 20:53:25 UTC-6, Andrew W wrote: I'm happy to

Re: [web2py] Re: how to decorate a function without using auth?

2012-12-20 Thread António Ramos
extra fields are available in my auth.user var but they have None instead of the real value so i create an extra function def checkempreiteiro(user): print auth.user.isempreiteiro # *returns None* record=db(db.auth_user.id==user).select()[0] return record['isempreiteiro']

[web2py] Re: widgets.checkboxes.widget INPUT inside LABLE

2012-12-20 Thread Paolo Caruccio
I think as Massimo said, but W3C raccomandation on formshttp://www.w3.org/TR/html5/forms.html#forms tells: To label a control, the label element is used; the label text and the control itself go inside the label element. So KMax request should be acceptable Il giorno giovedì 20 dicembre

Re: [web2py] Re: how to decorate a function without using auth?

2012-12-20 Thread António Ramos
Now i have 2 problems. Recap 1 - print auth.user.isempreiteiro # *returns None* record=db(db.auth_user.id==auth.user_id).select()[0] print record['isempreiteiro'] #*returns True This is the real value* Why? 2 - my decorated function in controller default works ok when user logged

[web2py] SQLFORM in html - Book example

2012-12-20 Thread Fabiano Faver
I tried the book example in http://web2py.com/books/default/chapter/29/07#SQLFORM-in-HTML It's not working. I tried to use to sqlform.process from a html form using the way, but did not work. Then I tried exactly the same code on book and still did not work. Its not validating the form, just

[web2py] json service

2012-12-20 Thread Manuele Pesenti
trying to expose this simple controller I got the subsequent error... does anybody understand why? the query runs perfectly inserted manually in a ipdb console... @service.json def mRender(): #import ipdb; ipdb.set_trace() query = (db.plugin_lookout_fields.table_id==source_table_id)

Re: [web2py] Re: how to decorate a function without using auth?

2012-12-20 Thread António Ramos
the first problem i solved with loggout then login 2? 2012/12/20 António Ramos ramstei...@gmail.com Now i have 2 problems. Recap 1 - print auth.user.isempreiteiro # *returns None* record=db(db.auth_user.id==auth.user_id).select()[0] print record['isempreiteiro'] #*returns

Re: [web2py] Re: how to hide a field until another field is chosen using SQLFORM.smartgrid

2012-12-20 Thread Jim Kellas
Thanks Jose, that was too easy! Jim From: Jose jjac...@gmail.com Reply-To: web2py@googlegroups.com Date: Wednesday, December 19, 2012 4:26 AM To: web2py@googlegroups.com Subject: [web2py] Re: how to hide a field until another field is chosen using SQLFORM.smartgrid El martes, 11 de

Re: [web2py] Re: how to decorate a function without using auth?

2012-12-20 Thread Anthony
On Thursday, December 20, 2012 11:00:28 AM UTC-5, Ramos wrote: Now i have 2 problems. Recap 1 - print auth.user.isempreiteiro # *returns None* record=db(db.auth_user.id==auth.user_id).select()[0] print record['isempreiteiro'] #*returns True This is the real value* Why?

[web2py] Re: SQLFORM in html - Book example

2012-12-20 Thread Anthony
Did you add session=None to the call to .process()? Anthony On Thursday, December 20, 2012 11:22:32 AM UTC-5, Fabiano Faver wrote: I tried the book example in http://web2py.com/books/default/chapter/29/07#SQLFORM-in-HTML It's not working. I tried to use to sqlform.process from a html form

[web2py] Re: widgets.checkboxes.widget INPUT inside LABLE

2012-12-20 Thread Anthony
On Thursday, December 20, 2012 10:50:47 AM UTC-5, Paolo Caruccio wrote: I think as Massimo said, but W3C raccomandation on formshttp://www.w3.org/TR/html5/forms.html#forms tells: To label a control, the label element is used; the label text and the control itself go inside the label

[web2py] Web2py vs Grails on VSCharts.com

2012-12-20 Thread António Ramos
i saw this page and link to share http://vschart.com/compare/web2py/vs/grails --

[web2py] Ver 2.3.2 changes the order models are loaded.

2012-12-20 Thread Jim Karsten
I have database tables defined in models/db.py. I have a controller-specific model defined in a models/client subdirectory. Ver 2.3.2 loads the models in a different order from ver 2.2.1. Ver 2.2.1 models/0.py models/db.py models/clients/edit/db.py Ver 2.3.2 models/0.py

[web2py] Re: Ver 2.3.2 changes the order models are loaded.

2012-12-20 Thread Anthony
That probably wasn't the right change. I think it should put the subfolders in alphabetical order and then run the files within each folder in alphabetical order (that's roughly how it worked prior to the change, but alphabetical ordering of the subfolders was not guaranteed). Anthony On

[web2py] Re: widgets.checkboxes.widget INPUT inside LABLE

2012-12-20 Thread Paolo Caruccio
For completeness: wrapping the input controls with label should be avoided when for the layout is used a table. In such case the label goes in one TD and the associated control in another TD. Bootstrap, indeed, doesn't use table layout for the forms. Il giorno giovedì 20 dicembre 2012

Re: [web2py] Re: web2py 2.3.2 added + - to some form elements

2012-12-20 Thread Christian Foster Howes
ok, here is a patch against current *trunk*. this should never allow you to remove the last item from the list. note that when the list is empty (showing one field with no data) the + and - buttons appear to be no-op. On 12/20/12 7:06 , Massimo Di Pierro wrote: For now I have remove the -

Re: [web2py] Re: web2py 2.3.2 added + - to some form elements

2012-12-20 Thread Christian Foster Howes
and here is the diff between the 2.3.2 release and the patch i made in case you want to apply it to gluon/sqlhtml.py in your environment. sorry for the headache! cfh On 12/20/12 7:06 , Massimo Di Pierro wrote: For now I have remove the - button. On Wednesday, 19 December 2012 23:48:37

[web2py] Re: json service

2012-12-20 Thread Massimo Di Pierro
yes. You are not supposed to return an iterable (in your case a list). web2py thinks you want to do streaming and will start looping over the iterable. This should change in web3py not we cannot change it in web2py. Massimo On Thursday, 20 December 2012 10:24:05 UTC-6, Manuele wrote: trying

Re: [web2py] Re: web2py 2.3.2 added + - to some form elements

2012-12-20 Thread Christian Foster Howes
(my first try didn't post) ok, here is a patch against current *trunk*. this should never allow you to remove the last item from the list. note that when the list is empty (showing one field with no data) the + and - buttons appear to be no-op. -- diff -r 4c55a243c4c2 gluon/sqlhtml.py

[web2py] Re: Ver 2.3.2 changes the order models are loaded.

2012-12-20 Thread Massimo Di Pierro
I agree with Anthony. The fix was wrong. I will write a patch if he does not send me one first. Massimo On Thursday, 20 December 2012 12:12:20 UTC-6, Jim Karsten wrote: I have database tables defined in models/db.py. I have a controller-specific model defined in a models/client

[web2py] Re: Beware auth.enable_record_versioning

2012-12-20 Thread Cliff Kachinske
To enable archiving, I added enable_record_versioning(db) = True to my models files. I encountered the problems described in the two bug reports I submitted today on Google code. At one point I thought it would help with isolating the problem if I turned off versioning, so I commented out the

[web2py] Question about SQLFORM.grid - process a column before show it

2012-12-20 Thread Christian Espinoza
Hi, I'm wondering about if is possible process the values of a column to show the result on the grid instead of original value... My Code: (db_events.events.device_id == request.vars.id) \ (db_events.events.event_datetime = from) \ (db_events.events.event_datetime = to) grid =

[web2py] Re: Ver 2.3.2 changes the order models are loaded.

2012-12-20 Thread Jim Karsten
Sounds good. Thanks guys On Thursday, December 20, 2012 1:12:20 PM UTC-5, Jim Karsten wrote: I have database tables defined in models/db.py. I have a controller-specific model defined in a models/client subdirectory. Ver 2.3.2 loads the models in a different order from ver 2.2.1. Ver

Re: [web2py] Interesting - Brython (python to javascript)

2012-12-20 Thread Vinicius Assef
I agree. On Thu, Dec 20, 2012 at 1:18 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Looks like this is too limited to be useful. On Monday, 17 December 2012 01:08:41 UTC-6, viniciusban wrote: Brypthon doesn't support string interpolation, too. :-( On Sun, Dec 16, 2012 at 6:40

[web2py] Re: Question about SQLFORM.grid - process a column before show it

2012-12-20 Thread Jim S
What does your model look like? -Jim On Thursday, December 20, 2012 2:15:20 PM UTC-6, Christian Espinoza wrote: Hi, I'm wondering about if is possible process the values of a column to show the result on the grid instead of original value... My Code: (db_events.events.device_id ==

Re: [web2py] Re: The book updates and status

2012-12-20 Thread Vinicius Assef
I can proof read and help amplifying some parts. I'd like to act on DAL chapter, for instance. On Thu, Dec 20, 2012 at 1:35 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: This is in: http://web2py.com/books/default/chapter/29/07?search=SQLFORM.grid#SQLFORM.grid-and-SQLFORM.smartgrid

[web2py] Re: Question about SQLFORM.grid - process a column before show it

2012-12-20 Thread Christian Espinoza
My Model for this App db_events.define_table('events', Field('devid', length=15, label='CODE'), Field('type', length=15, label='Type'), Field('index','integer', label='Action'), Field('datetime','datetime', label='Date'),

[web2py] Re: widgets.checkboxes.widget INPUT inside LABLE

2012-12-20 Thread Anthony
Good point. It will probably have to depend on the formstyle used. Anthony On Thursday, December 20, 2012 1:57:16 PM UTC-5, Paolo Caruccio wrote: For completeness: wrapping the input controls with label should be avoided when for the layout is used a table. In such case the label goes in

Re: [web2py] Re: Question about SQLFORM.grid - process a column before show it

2012-12-20 Thread Jim Steil
Have you though about adding a table to define the relation between 'index' and the text: db_actions.define_table('actions', Field(name, length=20, label='Action')) Then modify db_events so field index looks like: Field('index', db.actions, label='Action), Table actions would then have three

Re: [web2py] Re: Question about SQLFORM.grid - process a column before show it

2012-12-20 Thread Niphlod
Disclaimer: not tested why don't you just change the action Field to Field('action', requires=IS_IN_SET({ 0:'Quiet',1:'Running',2:'Fail'})) On Thursday, December 20, 2012 10:23:07 PM UTC+1, Jim S wrote: Have you though about adding a table to define the relation between 'index' and the

[web2py] Re: web3py?

2012-12-20 Thread Arnon Marcus
Pfff... The creator of web2py says he wishes he could do web3py some other way, but can't... Am I the only one that finds that funny? :) web3py will end up however you wish it to end up as... You can do whatever you want with it, as it's already inherently backwards incompatible (python

[web2py] Re: web3py?

2012-12-20 Thread Anthony
On Thursday, December 20, 2012 5:02:45 PM UTC-5, Arnon Marcus wrote: Pfff... The creator of web2py says he wishes he could do web3py some other way, but can't... I don't think he said that. He wasn't talking about web3py at all -- this is in reference to web2py. He was just noting the

Re: [web2py] Re: Question about SQLFORM.grid - process a column before show it

2012-12-20 Thread villas
I guess you need to use: actions.represent as well. On Thursday, December 20, 2012 9:46:58 PM UTC, Niphlod wrote: Disclaimer: not tested why don't you just change the action Field to Field('action', requires=IS_IN_SET({ 0:'Quiet',1:'Running',2:'Fail'})) On Thursday, December 20, 2012

[web2py] Re: Web2py vs Grails on VSCharts.com

2012-12-20 Thread villas
a very flexible, robust and easy to manage framework that put all other frameworks to shame +1 Right! --

[web2py] Re: hello3.xml question

2012-12-20 Thread villas
Hi Lucas, Yes, just make the generic_patterns as restrictive as poss; it is there mainly for security. On Thursday, December 20, 2012 4:16:29 AM UTC, lucas wrote: oh yeah, that worked absolutely great. thank you so much. so cool, data can be stripped and sent so many different ways. so

Re: [web2py] Re: Question about SQLFORM.grid - process a column before show it

2012-12-20 Thread Niphlod
my bad, sorry Christian. myset = { 0:'Quiet',1:'Running',2:'Fail'} Field('action', 'integer', requires=IS_IN_SET(myset), represent=lambda value, row: myset.get(value, None) # or myset[value] if you are totally sure that myset contains all the possible values

[web2py] Re: web3py?

2012-12-20 Thread Arnon Marcus
LOL.. You got me all wrong! :) I meant no disrespect, I adore Massimo! Massimo - You Da Man! I was just teasing a little, is all... You know, the way he said that it could have sounded as if he was frustrated from not being able to change his own creation - it's like a clay-sculptor staring at

[web2py] Re: web3py?

2012-12-20 Thread Anthony
OK, thanks for clarifying. So, when you asked the questionhttps://groups.google.com/d/msg/web2py/lwdZ5vEMGdM/8WYviZxIWfAJabout using HTML5 data- attributes, you were asking about how they would be supported in web3py, not how they are currently supported in web2py, correct? I think Massimo was

[web2py] Re: The book updates and status

2012-12-20 Thread Julien Courteau
I'm in for proof reading of the 5th edition. --

[web2py] Re: Login manually

2012-12-20 Thread Wonton
If you don't mind I could send you my project to your email directly. El jueves, 20 de diciembre de 2012 16:14:12 UTC+1, Massimo Di Pierro escribió: If your data is not confidential, any chance you send me your application? To me this looks like corrupted data in database as if the password

[web2py] Web2Py and Ajax

2012-12-20 Thread Martijn Hermans
I've just started using web2py and have a question about ajax calls. In my project a menu is defined (and build) in models/meny.py). The menu is added to the response like this : response.menu = _menu() In this way I can access the menu in my layout and that is exacly what I want, except...

[web2py] Web2Py and Ajax

2012-12-20 Thread Martijn Hermans
When I handle a request in Web2Py it builds a menu in models/menu.py. This behaviour is exactly what I want for a normal request, but I want to skip this, when I make an ajax-call. Is this possible? thx, Martijn --

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-20 Thread Mamisoa Andriantafika
I finally found the solution using COALESCE to merge and order date columns: exams_mutex = db().select(db.dataset1.date.coalesce(db.dataset2.date), db. dataset1.ALL, db.dataset2.ALL, left=[db.dataset1.on(db.mutex.i==0),db. dataset2.on(db.mutex.i==1)],

Re: [web2py] Re: web2py interactive shell in windows does not start the browser

2012-12-20 Thread Bhaskar Ramachandran
Thanks very much. This gives me a very good hold to understand web2py internals at my pace, understanding the internal workings step by step. Great!!. Can someone explain the workflow in greater details than what is available in the web2py 4th edition (Chapter: THE CORE page 137). ? One of you

[web2py] Re: Customizing auth login form but unable to set the form class name

2012-12-20 Thread Bhaskar Ramachandran
Hi Anthony, Your XML(form.custom..) command worked!!.* But simply writing the form statement in HTML did not .* I am customizing the auth.login() form here. In my default.py, i have dict(form=auth.login()) statement. Now if i simply manually write a form in pure HTML in the view file,

[web2py] Re: Customizing auth login form but unable to set the form class name

2012-12-20 Thread Anthony
Your XML(form.custom..) command worked!!.* But simply writing the form statement in HTML did not .* I am customizing the auth.login() form here. In my default.py, i have dict(form=auth.login()) statement. Now if i simply manually write a form in pure HTML in the view file, will

Re: [web2py] Web2Py and Ajax

2012-12-20 Thread Bruno Rocha
if not request.ajax: response.menu = _menu() On Thu, Dec 20, 2012 at 1:52 PM, Martijn Hermans martijn.herm...@gmail.comwrote: When I handle a request in Web2Py it builds a menu in models/menu.py. This behaviour is exactly what I want for a normal request, but I want to skip this, when I

[web2py] Re: Customizing auth login form but unable to set the form class name

2012-12-20 Thread Bhaskar Ramachandran
Great!. Thank you. Web2py is very much customizable!!. Regards, Bhaskar On Thursday, December 20, 2012 10:55:29 PM UTC-6, Anthony wrote: Your XML(form.custom..) command worked!!.* But simply writing the form statement in HTML did not .* I am customizing the auth.login() form here.

[web2py] Re: Web2Py and Ajax

2012-12-20 Thread Massimo Di Pierro
if not request.ajax: On Thursday, December 20, 2012 9:35:02 AM UTC-6, Martijn Hermans wrote: I've just started using web2py and have a question about ajax calls. In my project a menu is defined (and build) in models/meny.py). The menu is added to the response like this : response.menu =

[web2py] Re: Beware auth.enable_record_versioning

2012-12-20 Thread Massimo Di Pierro
This helped me a lot understand the problem. I believe I have a fix in trunk. Can you please check if the problem is indeed solved? On Thursday, December 20, 2012 1:21:21 PM UTC-6, Cliff Kachinske wrote: To enable archiving, I added enable_record_versioning(db) = True to my models files. I

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-20 Thread Massimo Di Pierro
Nice! You should sign up on experts4solutions.com. You'd approve you immediately. Massimo On Thursday, December 20, 2012 4:40:15 PM UTC-6, Mamisoa Andriantafika wrote: I finally found the solution using COALESCE to merge and order date columns: exams_mutex =

[web2py] Regarding ldap+kerberos authetication

2012-12-20 Thread r13race
Hello, I have an application that is using ldap+kerberose for authentication. models/db.py has the following code to configure the login method: from gluon.tools import * mail = Mail() # mailer auth = Auth(globals(),db) #

[web2py] Regarding running web2py.py on ubuntu

2012-12-20 Thread saransh
Hello, I have a web2py application running on Ubuntu and when i search for the processes running i cannot find python web2py.py running. Why is this so? Is there any other way of running web2py on ubuntu other than running web2py.py? --

[web2py] Re: web3py?

2012-12-20 Thread Massimo Di Pierro
Actually I like your solution. It could be even easier. class attr(object): def __init__(self,key,value): self.key=key self.value=value class DIV(object): def __init__(self,*components,**attributes): self.components = [] self.attributes = attributes

[web2py] Re: web3py?

2012-12-20 Thread Massimo Di Pierro
Ignore the very last line. Cut and paste error. On Friday, December 21, 2012 12:43:34 AM UTC-6, Massimo Di Pierro wrote: Actually I like your solution. It could be even easier. class attr(object): def __init__(self,key,value): self.key=key self.value=value class

Re: [web2py] Re: web2py interactive shell in windows does not start the browser

2012-12-20 Thread Massimo Di Pierro
I strongly agree. I wish people outside, specifically in the larger Python community, were to understand how large and how nice is this community is. On Thursday, December 20, 2012 8:04:44 PM UTC-6, Bhaskar Ramachandran wrote: Thanks very much. This gives me a very good hold to understand

[web2py] Re: The book updates and status

2012-12-20 Thread Massimo Di Pierro
Thanks this is great. One thing that can save you time is diff the current trunk version of the boot with first github commit. The first commit may still have bugs but less likely since it was already the published 4th edition. There is very little that needs to be added (most notably the

[web2py] Re: Regarding ldap+kerberos authetication

2012-12-20 Thread Massimo Di Pierro
Look into gluon/contrib/login_methods/ldap_auth.py It contains an example of how to use ldap. I am not sure about kerberos. There is nothing in web2py for kerberos but I understand kerberos can authenticate using both ldap and x509 and for both there is an API. If we need to add something and

[web2py] Re: Regarding running web2py.py on ubuntu

2012-12-20 Thread Massimo Di Pierro
Did you use setup-web2py-ubuntu.sh? In that case web2py is running under apache therefore you will only see the apache processes. Massimo On Friday, December 21, 2012 12:37:19 AM UTC-6, saransh wrote: Hello, I have a web2py application running on Ubuntu and when i search for the processes

Re: [web2py] Re: Regarding running web2py.py on ubuntu

2012-12-20 Thread Saransh Gupta
I am new to the system. I need to find out how it is running. How can i verify if setup-web2py-ubuntu.sh has been used? Would it be mentioned in apache2 config files? On Fri, Dec 21, 2012 at 12:24 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Did you use setup-web2py-ubuntu.sh? In

Re: [web2py] Re: Regarding running web2py.py on ubuntu

2012-12-20 Thread Massimo Di Pierro
when you visit a web page from chrome you can instead the response headers and you check which web server is serving pages. Probably you will see apache. In this case you should find a reference to web2py in one of the apache config file. On Friday, 21 December 2012 00:56:37 UTC-6, saransh

[web2py] Re: Div into Markmin

2012-12-20 Thread Massimo Di Pierro
Can you explain the purpose of this? On Sunday, 16 December 2012 03:57:20 UTC-6, David Alvarez wrote: I found a module to include in the syntax Markmin div, but I can not do the installation, the module is called Markdiv and attachment to see if anyone can make it work, or explain how to

[web2py] Re: Upload form, onvalidation and postbacks

2012-12-20 Thread Massimo Di Pierro
Which web2py version? I believe this was fixed in 2.2 or 2.3. Massimo On Thursday, 13 December 2012 11:55:34 UTC-6, Andy Salnikov wrote: Hi, I have an issue with the upload form and postbacks. In my application I need to validate file contents before accepting it from user upload form,

Re: [web2py] Re: Regarding running web2py.py on ubuntu

2012-12-20 Thread Saransh Gupta
I figured it out. Thank you. This application is using pam-auth() for authentication. I want to used db instead for the authentication process. I am unable figure out the login workflow. Please guide me through it or recommend a tutorial if available for the same. It will be of great help. On