[web2py] Re: form grid Order by a Field Value in the Parent Table

2017-09-12 Thread tim . nyborg
Your grid should be using a query that brings in both tables, rather than just the Voyages table: def Voyages(): Voyages = SQLFORM.grid(db.EQ_Voyages.Vessel == db.EQ_Vessels.id, fields =[db.EQ_Vessels.VesselName, db.EQ_Voyages.VesselNumber], csv=False, orderby =[db.EQ_Vessels.VesselName,

Re: {Disarmed} Re: {Disarmed} [web2py] Re: pytest and controllers protected with auth

2017-09-12 Thread Mathieu Clabaut
Thanks Antonio. There is a lot to do, unfortunately I really lack time to make this project advance. For now I use a py.test to run tests for https://bback.me web site, but it is too much tightly coupled with the application to be used as an independant pytest module. Hence the work in the

[web2py] Re: Update value on view

2017-09-12 Thread Wabbajack
Hi Anthony, It seems that i got it working ... The sad part is the graph flickers everytime it renders... :( Just a dumb question... Is it possible.. I have this on my controller py contoller/default.py def index(): ... return dict() def update_value(): ... return

[web2py] Re: How to use flatpickr in web2py in a custom form

2017-09-12 Thread Anthony
Just follow the flatpickr documentation: https://chmln.github.io/flatpickr/getting-started/ Keep in mind that web2py will add class "date" to date inputs and "datetime" to datetime inputs, so you can use those as selectors. Also, be sure not to load the default web2py calender.js file

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-12 Thread 黄祥
just tested that maxtextlengths doesnt have any effects, the long field value still have ... *e.g.* grid = SQLFORM.smartgrid(..., maxtextlengths = {'table_name.field_name' : 350} ) is it correct or should i just used maxtextlength = 350 ? thanks and best regards, stifan -- Resources: -

Re: [web2py] Re: HTML5 widgets on SQLFORM.factory

2017-09-12 Thread Fabiano Almeida
Great Anthony! Field('year', 'integer', label='Year', widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _type='number' )) worked perfectly! Thanks! 2017-09-11 19:59 GMT-03:00 Anthony : > On Monday, September 11, 2017 at 4:30:40 PM UTC-4, Fabiano Almeida wrote:

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-12 Thread Anthony
On Tuesday, September 12, 2017 at 8:39:16 AM UTC-4, 黄祥 wrote: > > just tested that maxtextlengths doesnt have any effects, the long field > value still have ... > *e.g.* > grid = SQLFORM.smartgrid(..., maxtextlengths = {'table_name.field_name' : > 350} ) > is it correct or should i just used

[web2py] Re: data represent in views is loaded faster using for loop python rather than using response json

2017-09-12 Thread Anthony
> > *views/default/index.html* > ... >

[web2py] Re: Has the result of a datetime Field changed?

2017-09-12 Thread Anthony
SQLFORM.factory creates a dummy DAL table via DAL(None). A change was made so that auto-validators no longer get applied to fields with DAL(None), so no fields in a SQLFORM.factory table will get the usual default DAL validators. Datetime fields typically get a default IS_DATETIME() validator

Re: [web2py] Re: Has the result of a datetime Field changed?

2017-09-12 Thread Martin Weissenboeck
Thank you for this explanation and the workaround. I have found the next *problem with "common_filter"*: it seems, that a common_filter is not applied in the following situation: db.define_table("test", Field("name"), common_filter = lambda query: db.test.id==1)