Re: [web2py] Re: Web3py
Ignorance on my side. If you want to make a PR switching to vuetify I will accept it. On Wednesday, 17 April 2019 02:17:49 UTC-7, Ramos wrote: > > Massimo , any reason you chose Bulma instead of vuetify ? > Vuetify is designed specifically for vuejs > Regards > António > > Em qua, 17 de abr de 2019 às 09:37, António Ramos > escreveu: > >> Worked for me... >> >> >> Em ter, 16 de abr de 2019 às 21:32, En Ware >> escreveu: >> >>> Thank you , that did it. >>> >>> On Tuesday, April 16, 2019 at 2:42:40 PM UTC-5, Massimo Di Pierro wrote: You have an old pydal. Do pip3 install --upgrade pydal Also do python3 web3py.py applications Not python3 web3py.py applications/todo/ -- >>> 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 this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web2py+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Asynchronous submission of request.vars values to Controller for calculations using Ajax
Which controller is displaying the view you have posted? It looks like the ajax function is calling the same controller which returns the index page. The controller function called by the ajax function should return a string. The string can be jquery which will be evaluated if you use ':eval'. Or it could be some text, like: 'The answer: xxx' which you can dump into a div without refreshing the page. *VIEW for default/index:* {{extend 'layout.html'}} The answer: {{=answer}} $('document').ready(function(){ $('#myform').submit(function() { ajax("{{=URL('default', 'new_answer')}}",['name'], 'answer_location'); return false; }); }); *CONTROLLER:* def index(): answer=0 return locals() def new_answer(): form = SQLFORM(db.post) if form.accepts(request, formname=None): info = request.vars.get('name', 0) if info: try: return 'The answer: {0}'.format(int(info)-200) except ValueError: return 'Bugger... should have better form validation.' elif form.errors: return TABLE(*[TR(k, v) for k, v in form.errors.items()]) -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Converting large app from Python2 to Python3 - how do you handle code in views ?
You can look at yatl code. https://github.com/web2py/yatl To see how web2py does it. But frankly I doubt you have much python 3 incompatible code in your views, I would just test them as they are, they're probably fine. -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Does web2py support SSE (server sent events) from HTML5?
following -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Asynchronous submission of request.vars values to Controller for calculations using Ajax
post a screenshot of your error and code... Em qua, 17 de abr de 2019 às 17:51, mostwanted escreveu: > I have seriously fiddled with docs code trying to bend it to my will but > its not obliging, maybe its my limited programming skills but thanks for > replying Ramos. > > Mostwanted > > -- > 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 this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How can I return a report to the user in the view?
You have to either convert those '\n' into or paragraph tags by doing something like this in the view {{=DIV(*[P(line) for line in report.split('\n')])}} or put the report inside a PRE tag to tell the browser the text comes preformatted {{=form}} {{=report}} -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Asynchronous submission of request.vars values to Controller for calculations using Ajax
I have seriously fiddled with docs code trying to bend it to my will but its not obliging, maybe its my limited programming skills but thanks for replying Ramos. Mostwanted -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Asynchronous submission of request.vars values to Controller for calculations using Ajax
try this from the docs... then change it accordingly to your needs def one(): return dict() def echo(): return request.vars.name and the associated "default/one.html" view: {{extend 'layout.html'}} Em qua, 17 de abr de 2019 às 13:47, mostwanted escreveu: > I understand what u are saying, how can i achieve what i am trying to > achieve this? Submit values to a controller without refreshing a page? > > On Wednesday, April 17, 2019 at 1:58:56 PM UTC+2, Ramos wrote: >> >> >> >> http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function >> >> >> >> Note the diference between :eval and the 'target' id alternative >> If you use eval than you have to return not locals() but a string with >> javascript to be evaluated like for example jQuery('#target').html('100' >> ); >> >> from the docs... >> >> {{extend 'layout.html'}} >> >> >> >> {{extend 'layout.html'}} >> >> >> >> >> >> Em qua, 17 de abr de 2019 às 12:18, mostwanted >> escreveu: >> >>> I am trying to do something that is supposed to be relatively simple, i >>> want to submit a value through a form to a controller for calculations >>> using ajax so that the page doesn't refresh but i am not getting any >>> results back in my view, i changed the way of doing that using ajax just >>> a-little bit, here is an example below: Its not working, I just wanna >>> submit a value from a view to a function without the view refreshing! >>> >>> *VIEW:* >>> {{extend 'layout.html'}} >>> >>> The answer: {{=answer}} >>> >>> >>> >>> >>> >>> >>> $('document').ready(function(){ >>> $('#myform').submit(function() { >>> ajax("{{=URL('index')}}",['name'], ':eval'); >>> return false; >>> }); >>> }); >>> >>> >>> *CONTROLLER:* >>> def index(): >>> answer=0 >>> info=request.vars.name >>> if info is None: >>> info=0 >>> if info: >>> info=int(info) >>> num1=200 >>> answer=info-num1 >>> return locals() >>> >>> Help!!! >>> >>> Mostwanted >>> >>> -- >>> 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 this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > 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 this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: howto prevent XSS in json data
Please open an issue, you're right, this is a bug and a security problem, it's also very easy to fix by simply copy pasting escapejs from django. -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Asynchronous submission of request.vars values to Controller for calculations using Ajax
I understand what u are saying, how can i achieve what i am trying to achieve this? Submit values to a controller without refreshing a page? On Wednesday, April 17, 2019 at 1:58:56 PM UTC+2, Ramos wrote: > > > > http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function > > > > Note the diference between :eval and the 'target' id alternative > If you use eval than you have to return not locals() but a string with > javascript to be evaluated like for example jQuery('#target').html('100'); > > from the docs... > > {{extend 'layout.html'}} > > > > {{extend 'layout.html'}} > > > > > > Em qua, 17 de abr de 2019 às 12:18, mostwanted > escreveu: > >> I am trying to do something that is supposed to be relatively simple, i >> want to submit a value through a form to a controller for calculations >> using ajax so that the page doesn't refresh but i am not getting any >> results back in my view, i changed the way of doing that using ajax just >> a-little bit, here is an example below: Its not working, I just wanna >> submit a value from a view to a function without the view refreshing! >> >> *VIEW:* >> {{extend 'layout.html'}} >> >> The answer: {{=answer}} >> >> >> >> >> >> >> $('document').ready(function(){ >> $('#myform').submit(function() { >> ajax("{{=URL('index')}}",['name'], ':eval'); >> return false; >> }); >> }); >> >> >> *CONTROLLER:* >> def index(): >> answer=0 >> info=request.vars.name >> if info is None: >> info=0 >> if info: >> info=int(info) >> num1=200 >> answer=info-num1 >> return locals() >> >> Help!!! >> >> Mostwanted >> >> -- >> 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 this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Problem with admin debugger still in 2.17.1
This is still not fixed in 2.18.5. Breakpoint only works first time. After continuing, the code runs at full speed but the breakpoint won't trigger again. Clearing breakpoint in the admin screen and re-adding it makes no difference. Clearing removes the breakpoint from the admin screen but puts an error on the console "*** DO_CLEAR failed Non-numeric breakpoint number (all})" On Saturday, October 6, 2018 at 3:07:30 PM UTC-4, Massimo Di Pierro wrote: > > We will address this in 2.17.3 > > On Friday, 5 October 2018 13:52:17 UTC-7, David Manns wrote: >> >> I occasionally use the admin debugger package to investigate problems >> when running in my test environment on Windows 10 using the source >> distribution of web2py and Python 2.7 >> >> When I place a breakpoint on the code and execute my test case the >> interactive debugger is triggered, and I can step through code, examine >> variables, etc. When I have gathered the information I need and click >> 'continue' the application indeed continues and can be used as normal >> (though I think it runs slowly, as if the debugger is still checking). >> >> The problem is that the debugger will no longer work. Code will execute >> straight through either previously or newly set breakpoints without going >> into debug mode. Only shutting down the test server and restarting it works. >> >> I raised this a long time ago in the context of 2.16.1, problem still >> exists in 2.17.1. >> > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Asynchronous submission of request.vars values to Controller for calculations using Ajax
http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function Note the diference between :eval and the 'target' id alternative If you use eval than you have to return not locals() but a string with javascript to be evaluated like for example jQuery('#target').html('100'); from the docs... {{extend 'layout.html'}} {{extend 'layout.html'}} Em qua, 17 de abr de 2019 às 12:18, mostwanted escreveu: > I am trying to do something that is supposed to be relatively simple, i > want to submit a value through a form to a controller for calculations > using ajax so that the page doesn't refresh but i am not getting any > results back in my view, i changed the way of doing that using ajax just > a-little bit, here is an example below: Its not working, I just wanna > submit a value from a view to a function without the view refreshing! > > *VIEW:* > {{extend 'layout.html'}} > > The answer: {{=answer}} > > > > > > > $('document').ready(function(){ > $('#myform').submit(function() { > ajax("{{=URL('index')}}",['name'], ':eval'); > return false; > }); > }); > > > *CONTROLLER:* > def index(): > answer=0 > info=request.vars.name > if info is None: > info=0 > if info: > info=int(info) > num1=200 > answer=info-num1 > return locals() > > Help!!! > > Mostwanted > > -- > 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 this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Asynchronous submission of request.vars values to Controller for calculations using Ajax
I am trying to do something that is supposed to be relatively simple, i want to submit a value through a form to a controller for calculations using ajax so that the page doesn't refresh but i am not getting any results back in my view, i changed the way of doing that using ajax just a-little bit, here is an example below: Its not working, I just wanna submit a value from a view to a function without the view refreshing! *VIEW:* {{extend 'layout.html'}} The answer: {{=answer}} $('document').ready(function(){ $('#myform').submit(function() { ajax("{{=URL('index')}}",['name'], ':eval'); return false; }); }); *CONTROLLER:* def index(): answer=0 info=request.vars.name if info is None: info=0 if info: info=int(info) num1=200 answer=info-num1 return locals() Help!!! Mostwanted -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: one form multiple submits
On Tuesday, April 16, 2019 at 6:46:52 PM UTC-7, Dave S wrote: > > > > On Tuesday, April 16, 2019 at 2:56:53 PM UTC-7, Ben Lawrence wrote: >> >> The _value is the word that appears inside the button on the web-page. It >> seems "Working..." is the value in form.vars where the key is _name. >> >> regards >> Ben >> > > All the other buttons show up in form.vars as well? I'd have expected > only the one that was clicked. > > I'll have to contrive an example at home. > I did, with 3 buttons. The original "Submit" button was not shown, and clicking on any of the 3 added buttons submitted the form. All 3 ids were in form.vars, 2 with empty string values and 1 with 'Working...'. A lesson in every box. /dps -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Web3py
found it self.start = function() { *Vue.config.devtools = true;* self.vue = new Vue({el: '#vue', data: self.data, methods: self.methods, filters: self.filters}); self.on_load(); }; Em qua, 17 de abr de 2019 às 10:38, António Ramos escreveu: > How to use vue devtools? > Vue.js is detected on this page. Devtools inspection is not available > because it's in production mode or explicitly disabled by the author. > > > Em qua, 17 de abr de 2019 às 10:17, António Ramos > escreveu: > >> Massimo , any reason you chose Bulma instead of vuetify ? >> Vuetify is designed specifically for vuejs >> Regards >> António >> >> Em qua, 17 de abr de 2019 às 09:37, António Ramos >> escreveu: >> >>> Worked for me... >>> >>> >>> Em ter, 16 de abr de 2019 às 21:32, En Ware >>> escreveu: >>> Thank you , that did it. On Tuesday, April 16, 2019 at 2:42:40 PM UTC-5, Massimo Di Pierro wrote: > > You have an old pydal. Do > > pip3 install --upgrade pydal > > Also do > > python3 web3py.py applications > > Not > > python3 web3py.py applications/todo/ > > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Web3py
How to use vue devtools? Vue.js is detected on this page. Devtools inspection is not available because it's in production mode or explicitly disabled by the author. Em qua, 17 de abr de 2019 às 10:17, António Ramos escreveu: > Massimo , any reason you chose Bulma instead of vuetify ? > Vuetify is designed specifically for vuejs > Regards > António > > Em qua, 17 de abr de 2019 às 09:37, António Ramos > escreveu: > >> Worked for me... >> >> >> Em ter, 16 de abr de 2019 às 21:32, En Ware >> escreveu: >> >>> Thank you , that did it. >>> >>> On Tuesday, April 16, 2019 at 2:42:40 PM UTC-5, Massimo Di Pierro wrote: You have an old pydal. Do pip3 install --upgrade pydal Also do python3 web3py.py applications Not python3 web3py.py applications/todo/ -- >>> 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 this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web2py+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Web3py
Massimo , any reason you chose Bulma instead of vuetify ? Vuetify is designed specifically for vuejs Regards António Em qua, 17 de abr de 2019 às 09:37, António Ramos escreveu: > Worked for me... > > > Em ter, 16 de abr de 2019 às 21:32, En Ware escreveu: > >> Thank you , that did it. >> >> On Tuesday, April 16, 2019 at 2:42:40 PM UTC-5, Massimo Di Pierro wrote: >>> >>> You have an old pydal. Do >>> >>> pip3 install --upgrade pydal >>> >>> Also do >>> >>> python3 web3py.py applications >>> >>> Not >>> >>> python3 web3py.py applications/todo/ >>> >>> -- >> 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 this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: SQLTABLE and SQLFORM.grid with PRE()
On Monday, April 15, 2019 at 11:37:36 PM UTC-7, Dave S wrote: > > > > On Monday, April 15, 2019 at 10:51:17 PM UTC-7, Massimo Di Pierro wrote: >> >> db.table.field.represent = lambda value, row: PRE(value) >> >> > Obvious now! Thank you much. > > /dps > While this worked very well, the PRE class was setup (in bootstrap?) with a grey background that didn't go with my greenbar scheme, and the font size was tiny but the margins big, and really I just needed "typewriter" font, so after a bit of diddling, I ended up tweaking the above to represent = lambda value, row: SPAN(value,_style="font-family:courier new,monospace") Went from Arches dD to Arches (yes, row height was different) /dps -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Web3py
Worked for me... Em ter, 16 de abr de 2019 às 21:32, En Ware escreveu: > Thank you , that did it. > > On Tuesday, April 16, 2019 at 2:42:40 PM UTC-5, Massimo Di Pierro wrote: >> >> You have an old pydal. Do >> >> pip3 install --upgrade pydal >> >> Also do >> >> python3 web3py.py applications >> >> Not >> >> python3 web3py.py applications/todo/ >> >> -- > 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 this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Does web2py support SSE (server sent events) from HTML5?
Thanks Anthony. quarta-feira, 17 de Abril de 2019 às 03:23:50 UTC+1, Anthony escreveu: > > On Tuesday, April 16, 2019 at 11:14:10 AM UTC-4, João Matos wrote: >> >> Thanks Anthony, but I'm using Apache. >> >> Do you know any current solution for Apache? >> > > You should be able to run Centrifugo or Pushpin side-by-side with Apache > (on a different port). You could even run Nginx alongside Apache, or even > proxy from Nginx to Apache. > > >> Do you recommend Nginx over Apache? If so, why? >> > > Nginx + uWSGI seems to be a common combination for web2py (and other > Python frameworks) these days. Do some searches for pros and cons of each > web server. I believe Nginx will be faster for serving static files, and of > course it can serve as a reverse proxy, so it can serve both your Python > app via uWSGI as well as proxy to something like Nchan or Centrifugo for > real-time push connections. > > Anthony > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: CORS headers on static file
The usual process for CORS is to put web2py behind nginx and configure nginx for CORS On Tuesday, 16 April 2019 03:45:28 UTC-7, David Orme wrote: > > Hi, > > I'm running a static website from an S3 bucket that calls an API running > on web2py and I've run into a problem with CORS. I can update the headers > for API calls by editing the calls() controller: > > def call(): > """ > exposes services. for example: > http:///[app]/default/call/jsonrpc > decorate with @services.jsonrpc the functions to expose > supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv > """ > > > # Set response headers > response.headers['Pragma'] = None > response.headers['Access-Control-Allow-Origin'] = '*' > response.headers['Access-Control-Allow-Headers'] = 'Content-Type' > response.headers['Access-Control-Allow-Methods'] = 'GET, OPTIONS' > > > # Dump the session to remove Set-Cookie > session.forget(response) > > > return service() > > > What I can't figure out how to do is to provide those headers for some > static resources. I could wrap them up in a service and cache them, but is > there a way to preserve the existing path and adjust the CORS headers? A > quick look at gluon/main.py makes it seem tricky, but there are a lot of > moving parts in there! > > Cheers, > David > > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Controller/function called via ajax() returns javascript inside JS
Not enough information. can you post a more complete example we can run? On Tuesday, 16 April 2019 02:26:13 UTC-7, Octavian G wrote: > > Hello, > > Using web2py-1.18.5. Calling a controller/function via: > > onclick="ajax('{{=URL('bla', 'bla.load', vars={'whatever': 'all'})}}', > [], ':eval') > > > Inside the function, there is: > > script = "$ javascript code here;" > return script > > > The generic.load is the default one. > > Jquery complains that it can't eval the returned value because of a syntax > error. The code itself has no syntax error, but it is returned like this: > > JS CODE HERE > > > Any ideas about what's happening ? > -- 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 this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.