[web2py] Re: Dropdown lists cascade in Crud form

2017-04-12 Thread Massimo Di Pierro
Please do not use crud nobody has supported them in ages. replace return dict(form=crud.create(db.Person, message=T("The person was created!" ))) with return dict(form=SQLFORM(db.Person).process(message_onsuccess=T("The person was created!"))) On Sunday, 9 April 2017 14:52:46 UTC-5, Winter Kry

Re: [web2py] Re: Dropdown lists

2015-01-28 Thread Richard Vézina
Forget the most important, I got my second one in june... :) On Wed, Jan 28, 2015 at 9:39 AM, Richard Vézina wrote: > no times... I am alone supporting lab data management for 200+ employees > startup... And in my personel life, I buy a new house this year and > renovate it from basement to sec

Re: [web2py] Re: Dropdown lists

2015-01-28 Thread Richard Vézina
no times... I am alone supporting lab data management for 200+ employees startup... And in my personel life, I buy a new house this year and renovate it from basement to second floors, starting with a new drain around the basement earlier last summer (of course, this is done now)... :-P On Tue, J

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Niphlod
it seems that you're rather "full" of issues and ideas but "empty" on the attempts side. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received thi

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Richard Vézina
TDD may be easier with angularjs... I would say... Richard On Tue, Jan 27, 2015 at 5:05 PM, Richard Vézina wrote: > Yes, that is another issue... > > I am thinking more and more to learn Angularjs more then what I really > know or start using Ractive.js that seems have easier learning curve...

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Richard Vézina
Yes, that is another issue... I am thinking more and more to learn Angularjs more then what I really know or start using Ractive.js that seems have easier learning curve... web2py component is great, but I feel really limited in developping complex "form" like user interraction for complex data m

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Niphlod
testing html generation is one-now-more-than-ever-shrinking-part of testing an app. In this particular case, you won't have noticed a thing: the important bits were/are played by javascript interaction. On Tuesday, January 27, 2015 at 10:38:49 PM UTC+1, Richard wrote: > > I would test the fact

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Richard Vézina
I would test the fact that html generated work properly, I guess Selenium is the only way, but if I can interact with html object from python with someting like HTMLTestRunner ( http://tungwaiyip.info/software/HTMLTestRunner.html)... I never had time to think about test cases worth doing over gener

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Derek
You are wrong. If you need to test your views, you would have to use some kind of testing tool like Selenium, of course. However, you should not be generating views within the controllers, they have separate functions. It makes no sense. Besides, what are you going to test, the generation of the

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Richard Vézina
Also, consider tools like SQLFORM.grid(), it's generate everything... Richard On Tue, Jan 27, 2015 at 2:13 PM, Richard Vézina wrote: > Derek, > > I understand your point, but from the testing point of view, the only > option remaining for testing view is Selenium HQ which is slow, so if you > w

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Richard Vézina
Derek, I understand your point, but from the testing point of view, the only option remaining for testing view is Selenium HQ which is slow, so if you want to be able to test your controller that depend a lot of the view, what I can only see is to limit as much as possible the view to unpack web2p

Re: [web2py] Re: Dropdown lists

2015-01-27 Thread Omi Chiba
Thank you for your feedback! I found " onchange="jQuery('#model_name').empty();" this is unnecessary operation for my purpose so it's removed! On Tue, Jan 27, 2015 at 11:19 AM, Derek wrote: > What I mean by 'you are mixing your view with your controller' is that you > are using your controller

[web2py] Re: Dropdown lists

2015-01-27 Thread Derek
What I mean by 'you are mixing your view with your controller' is that you are using your controller to build HTML that will be used as-is. You should never create HTML in your controllers, leave that to the views. The whole point of MVC is that each part has a very specific purpose. Don't creat

[web2py] Re: Dropdown lists

2015-01-27 Thread Derek
Well, where do I start? It looks like you are a victim of copy and paste coding. Delete your two functions and start over again. That said, you are mixing your view with your controller, please don't do that. I would suggest you use this web2pyslice as a starting point. (yes, I wrote it) http: