[web2py] How to disable debugging
Hello, I have attached the screenshot of the page rendered, and there is some debugging information. How can I disable it? regards Praveen attachment: 1.JPG
Re: [web2py] How to disable debugging
You are using generic views. Better to create your own views. But, if you want to disabled that, you need to edit the views/generic.html and remove the {{=response.toolbar()}} On Tue, Feb 7, 2012 at 1:05 PM, Praveen Bhat praveenbha...@gmail.comwrote: Hello, I have attached the screenshot of the page rendered, and there is some debugging information. How can I disable it? regards Praveen -- Bruno Rocha [http://rochacbruno.com.br]
Re: [web2py] How to disable debugging
Removing {{=response.toolbar()}} just prevents it from showing, or does it actually disable it from being called in the background and assigned to the response object? On Tue, Feb 7, 2012 at 7:25 AM, Bruno Rocha rochacbr...@gmail.com wrote: You are using generic views. Better to create your own views. But, if you want to disabled that, you need to edit the views/generic.html and remove the {{=response.toolbar()}} On Tue, Feb 7, 2012 at 1:05 PM, Praveen Bhat praveenbha...@gmail.comwrote: Hello, I have attached the screenshot of the page rendered, and there is some debugging information. How can I disable it? regards Praveen -- Bruno Rocha [http://rochacbruno.com.br] -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com http://www.fitnessfriendsfinder.com
Re: [web2py] How to disable debugging
Hello Bruce, Thanks for your quick reply. But I do not find any generic.html view file as I am using the Windows Webpy. Regards, Praveen On Tue, Feb 7, 2012 at 9:01 PM, Bruce Wade bruce.w...@gmail.com wrote: Removing {{=response.toolbar()}} just prevents it from showing, or does it actually disable it from being called in the background and assigned to the response object? On Tue, Feb 7, 2012 at 7:25 AM, Bruno Rocha rochacbr...@gmail.com wrote: You are using generic views. Better to create your own views. But, if you want to disabled that, you need to edit the views/generic.html and remove the {{=response.toolbar()}} On Tue, Feb 7, 2012 at 1:05 PM, Praveen Bhat praveenbha...@gmail.comwrote: Hello, I have attached the screenshot of the page rendered, and there is some debugging information. How can I disable it? regards Praveen -- Bruno Rocha [http://rochacbruno.com.br] -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com http://www.fitnessfriendsfinder.com
Re: [web2py] How to disable debugging
On Tuesday, February 7, 2012 11:32:21 AM UTC-5, Praveen Bhat wrote: Hello Bruce, Thanks for your quick reply. But I do not find any generic.html view file as I am using the Windows Webpy. generic.html should be in /web2py/application/your_app/views (even in the Windows distribution). Note, it includes the following code: {{if request.is_local:}} {{=response.toolbar()}} {{pass}} So, the toolbar will appear only for local requests (i.e., on your development machine), not once the app is deployed to production. In any case, as Bruno mentioned, you should ultimately create your own action-specific views rather than rely on the generic views (particularly for HTML views). Anthony
Re: [web2py] How to disable debugging
On Tuesday, February 7, 2012 10:31:39 AM UTC-5, Detectedstealth wrote: Removing {{=response.toolbar()}} just prevents it from showing, or does it actually disable it from being called in the background and assigned to the response object? .toolbar() is a method that is called to generate the toolbar -- if you remove {{=response.toolbar()}}, the method never gets called and no toolbar is generated. Nothing gets assigned to the response object at all, even when the method is called -- the method simply returns the HTML helpers to generate the toolbar, which gets serialized to HTML in the view. Anthony
Re: [web2py] How to disable debugging
Hello, The form and records words appear even after taking off {{=response.toolbar()}} line from generic.html.. regards, Pravene
Re: [web2py] How to disable debugging
On Tuesday, February 7, 2012 11:54:59 AM UTC-5, Praveen Bhat wrote: Hello, The form and records words appear even after taking off {{=response.toolbar()}} line from generic.html.. Your controller is returning a dict containing form and records keys -- the following generic.html code automatically displays whatever is returned by the controller (which is stored in response._vars): h2{{=' '.join(x.capitalize() for x in request.function.split('_'))}}/h2 {{if len(response._vars)==1:}} {{=response._vars.values()[0]}} {{elif len(response._vars)1:}} {{=BEAUTIFY(response._vars)}} {{pass}} Note, the above also automatically generates an H2 heading based on the function name. You can remove all that, but then there's not much point in having a generic.html view at all (what will it display?). Anthony