Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread 黄祥
*Traceback (most recent call last):* File "/Users/MacBookPro/project/python/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/MacBookPro/project/python/web2py/applications/test/views/default/index.html", line 60, in File "/Users/MacBookPro/pro

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread 黄祥
*Traceback (most recent call last):* File "/Users/sugizo/project/python/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/sugizo/project/python/web2py/applications/test/controllers/install_demo.py", line 490, in File "/Users/sugizo/project/pyt

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread Massimo Di Pierro
check your models/menu.py you may have separators in the menu. The new layout does not support them. On Tuesday, 14 November 2017 02:22:51 UTC-6, 黄祥 wrote: > > *Traceback (most recent call last):* > File "/Users/MacBookPro/project/python/web2py/gluon/restricted.py", line > 219, in restricted >

[web2py] Using the DAL "stand-alone" on Pythonanywhere

2017-11-14 Thread rafi farchi
Hi I am using web2py on Pythonanywhere free host . How can test DAL stand alone ? have tried on python prompt but the module is not recognized . from gluon import DAL, Field # also consider: from gl -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Web2Py + VueJS SPA (Webpack)

2017-11-14 Thread Carlos A. Armenta Castro
I have using Web2Py for too many years for commercial websites and for Intranets in México, I want to say that Web2Py is an AMAZING Framework!!! For my new project I need to use an SPA VueJs + Webpack for the FrontEnd ( http://quasar-framework.org/ ) and a Web2Py as my BackEnd API Server. I'm

[web2py] Re: restful service + auth on same application/ different controllers = gives Not authorized message

2017-11-14 Thread Carlos A. Armenta Castro
Hola Leandro, te escribo en español porque al ver tu nombre me parece que hablas castellano, corrigeme si me equivoco y te lo escribo en ingles, El lunes, 13 de noviembre de 2017, 7:14:00 (UTC-7), Leandro Sebastian Salgueiro escribió: I added then the requires_login to api controller and the

[web2py] Enter a valid URL

2017-11-14 Thread 'Annet' via web2py-users
I have a user complaining that my application does not accept his URL ending on .online doesn't Web2py validate this kind of URL? Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.

[web2py] Re: How to determine the distinct values of a given grid column for the current selection

2017-11-14 Thread Vincent Borghi
To answer to Dave's questions: - Yes they can select more than one line. Wat I call the "selected lines" are the lines fetched by the current query. - I only need that on the server side. When you write "If on the server, doesn't the db query for the row selected give that value?" I do not reall

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread Yoel Benitez Fonseca
Got some strange result after the updates... im ussing pytest for testing and the was a test for a submit form with was working últil the update, the model: db.define_table( 'producto', Field('nombre', 'string', length=50, unique=True, label='Nombre:'), Field('tipo_prod

[web2py] Re: Enter a valid URL

2017-11-14 Thread Leonel Câmara
Not yet actually (the of top level domains list was last updated in 2015-Feb-24) but you may pass a list of allowed top level domains to IS_URL. Using the allowed_tlds argument. If you're running web2py from source you can also update your own official_top_level_domains list using scripts/parse

[web2py] revert to previous version of a record while using enable_record_versioning

2017-11-14 Thread Pengfei Yu
Hi, I am using "auth.enable_record_versioning" to track the version of each record's update for my database tables. It works great now to keep different previous versions of a record in the "*_archive" tables. For my application, I also need features to allow some users to revert one record ba

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread Massimo Di Pierro
Can you send me a simple app to reproduce the problem. On Tuesday, 14 November 2017 12:20:03 UTC-6, Yoel Benitez Fonseca wrote: > > Got some strange result after the updates... im ussing pytest for > testing and the was a test for a submit form with was working últil > the update, the model: >

[web2py] Re: Web2Py + VueJS SPA (Webpack)

2017-11-14 Thread Massimo Di Pierro
This is fantastic. Thank you Carlos, please email me personally about you work. I think this is the path to the future of web2py. On Tuesday, 14 November 2017 10:48:03 UTC-6, Carlos A. Armenta Castro wrote: > > I have using Web2Py for too many years for commercial websites and for > Intranets in

Re: [web2py] Web2Py + VueJS SPA (Webpack)

2017-11-14 Thread José Luis Redrejo
Hi Carlos I would recommend you to use this webpack helper: https://github.com/Plortinus/vue-multiple-pages Doing "vue init Plortinus/vue-multiple-pages new-project" you get the structure to work, just add the div for app to the class and import the page js per each page. Also, in webpack.config.

[web2py] Re: Web2py and machine learning - scikit-learn

2017-11-14 Thread Massimo Di Pierro
I have. Works fine. You can import any python library in web2py as long as it is installed. You can have issues with libraries that are not thread safe and if they are, you will have to lock when using them. I do not know for sure which algos in scikit learn are thread safe and which ones are no

[web2py] Re: revert to previous version of a record while using enable_record_versioning

2017-11-14 Thread Massimo Di Pierro
it is not implemented because I cannot see one size fits all. Often reverting is not as easy as reverting a single record. On Tuesday, 14 November 2017 13:02:46 UTC-6, Pengfei Yu wrote: > > Hi, > > I am using "auth.enable_record_versioning" to track the version of each > record's update for my d

[web2py] Re: where is pydal doc ?

2017-11-14 Thread Massimo Di Pierro
I can extend the documentation but I am not sure what people find is missing specifically. Can you ask some specific questions? how do I do [what]? On Wednesday, 8 November 2017 08:40:33 UTC-6, Leonel Câmara wrote: > > Lars I think everyone agrees the pyDAL codebase should be better > documente

Re: [web2py] Web2Py + VueJS SPA (Webpack)

2017-11-14 Thread José Luis Redrejo
Carlos, by the way, if you are not in a hurry I can prepare a proof of concept this weekend. I just can tell it really works because I am using it in a system in production. Of course, that's the develop setup, once develop is done in production we use nginx-uwsgi only, but in that case there's no

[web2py] API Response workaround

2017-11-14 Thread Marco Mansilla
Hi, I'm working on a new project that requires a restful api service and found a problem. Following the examples in the book and Bruno's example in web2py slices could successfully write an API service, also tried the APIMaker example from expert4solutions. In the second case didn't get valida

[web2py] Re: Let's Encrypt renewals, Rocket, and nginx

2017-11-14 Thread Dave S
On Monday, November 13, 2017 at 11:27:39 PM UTC-8, Dave S wrote: > > [..] > Finally, I stopped Rocket, did a --standalone update, and got my cert. > Restarted Rocket, and got connection refused. Hmmm. > [...] > 1. Rocket did not give any useful information about the problem, or even > ad

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread Alfonso de la Guarda
El 14 nov. 2017 2:05 AM, "Massimo Di Pierro" escribió: > I suspect you have two web2py running. Or maybe on update it did not > correctly unzip. Can you try kill all and restart? > > On Tuesday, 14 November 2017 00:15:12 UTC-6, Kiran Subbaraman wrote: >> >> Thanks for the new version. >> >> Downl

Re: [web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread 黄祥
yes, comment or delete the LI(_class = "divider") solve the problem, thank you massimo in previous version the menu can be created with *models/menu.py* if auth.user: response.menu += [ (SPAN(T('Settings'), _title = T('Settings') ), False, URL('settings', 'index'), [ test_menu.menu_0('Languag

[web2py] Re: web2py 2.16.1 is OUT

2017-11-14 Thread Leonel Câmara
You can use this to render the menu, just put the function in a model (or in a module and import it in the model) and replace line 43-60 of layout.html with {{=BS4MENU(response.menu)}} It changes your LI(_class='divider') to LI(_class='dropdown-divider') to work with BS4 def BS4MENU(data, id_p

[web2py] Re: How to get teh last DB Field data

2017-11-14 Thread Leonel Câmara
I'm not sure I understand what you're doing. However you're not ordering your results, so, depending on the database you won't necessarily get ordered results. Try adding a order_by=db.post.id to your select. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gi

[web2py] Re: API Response workaround

2017-11-14 Thread Leonel Câmara
For me, it's good that the API returns 200 OK and a dict with the errors. Why do you think 404 would be a good status code? The URL exists, you just called it with data that did not validate. Still, if that's what you really want just check for errors in the validate_and_insert and "raise HTTP(4

Re: [web2py] Web2Py + VueJS SPA (Webpack)

2017-11-14 Thread 黄祥
i'm interest too, could you give some simple example (crud) to learn how it works? thanks and best regards, stifan -- 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 Is

Re: [web2py] Re: How to get teh last DB Field data

2017-11-14 Thread Maurice Waka
Done that. Still can't get the last item inserted. I keep getting the second last item updated. On 15 Nov 2017 4:10 AM, "Leonel Câmara" wrote: > I'm not sure I understand what you're doing. However you're not ordering > your results, so, depending on the database you won't necessarily get > orde

[web2py] Failing calculate the average

2017-11-14 Thread mostwanted
i'm failing to calculate avarage on my web2py application But its supposed to be very simple, i have been able to calculate the percentages for all the marks now i want to add up all those percentages and divide them by the number of subjects, get the avarage percentage and grade a studen

Re: [web2py] Re: How to get teh last DB Field data

2017-11-14 Thread Maurice Waka
What I mean 6if there ate 5 items or rows in the db, a user inputs the sixth item. This goes to form row number 6. I can get or retrieve this row unless I manually refresh the db. Could there be another way too such as getting the item from request.vars if I can't get it from the db? On 15 Nov 201

Re: [web2py] Web2Py + VueJS SPA (Webpack)

2017-11-14 Thread José Luis Redrejo
I will do it this weekend, by the way crud is not simple at all. In fact it's one of the most complex things ;) 2017-11-15 3:04 GMT+01:00 黄祥 : > i'm interest too, could you give some simple example (crud) to learn how > it works? > > thanks and best regards, > stifan > > -- > Resources: > - http

[web2py] Re: Using the DAL "stand-alone" on Pythonanywhere

2017-11-14 Thread rafi farchi
Hi Have Found a solution . from Bash console have installed pydal On Tuesday, November 14, 2017 at 5:06:35 PM UTC+2, rafi farchi wrote: > > Hi > > > I am using web2py on Pythonanywhere free host . > How can test DAL stand alone ? > have tried on python prompt but the module is not recognized . >

Re: [web2py] Is it possible to translate data in SQLFORM.grid?

2017-11-14 Thread Yebach
hello I have a similar problem except it goes for only one table - no parent - child relationship db.define_table('config', Field('co_code', type = 'string', length = 256 ,label = T('Code')), Field('co_organization','reference organizations' ,label = T('Organiza