[web2py] Re: response.menu links alt attribute and target="blank"

2018-08-21 Thread lyn2py
I see! Thanks Anthony On Monday, August 20, 2018 at 8:33:15 PM UTC+8, Anthony wrote: > > Are you using the default layout.html in the welcome app? If so, it no > longer uses the MENU() helper, so the solutions you reference do not work. > Instead, you will have to edit the code in layout.html to

[web2py] session data type changed after upgrade to 2.17.1

2018-08-21 Thread icodk
Have: session.end_date=request.now.date() and then retrieve it as: datetimeEnd=datetime.datetime.combine(session.end_date, datetime.time.max) this all worked fine in 2.14.6 but after upgrade to 2.17.1 I get: datetimeEnd=datetime.datetime.combine(session.end_date, datetime.time.max) TypeErr

[web2py] Calling a SQLFORM.grid from SQLFORM.grid return to the index page can't figure why

2018-08-21 Thread Yann Dulondel
Hello, web2py world. I'm new to web2py and web development. The index page displays a list of equipment type and has a link to a list of equipment of this type. The index works fine but using the link redirect to the index page. There is no error message. When I replace the index code by the show_

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Peng Wang
How did you define your cities_list? On Thursday, August 16, 2018 at 4:39:35 PM UTC-7, Rodrigo Gomes wrote: > > > Good evening, folks, I've come here to unveil a mystery, I'm developing an > application with web2py, (framework that I use about 3 years ago) > > I am using sqlform.factory, passing

[web2py] Re: Calling a SQLFORM.grid from SQLFORM.grid return to the index page can't figure why

2018-08-21 Thread Anthony
Is this the *exact *code? I see args=[row.id], but the query involves a join, so I would expect row.id to throw an exception, as it should be row.type_article.id. Anthony On Tuesday, August 21, 2018 at 9:10:39 AM UTC-4, Yann Dulondel wrote: > > Hello, web2py world. > I'm new to web2py and web d

Re: [web2py] Re: DAL MySQL text type

2018-08-21 Thread Carlos Cesar Caballero Díaz
Great, Thanks!! El 20/08/18 a las 15:49, Anthony escribió: On Monday, August 20, 2018 at 2:41:22 PM UTC-4, Carlos Cesar Caballero wrote: Thanks Anthony, LONGTEXT is exactly what I need. But in case of necessity, how "experimental" is that feature? Should I be worried about unnotic

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Rodrigo Gomes
@auth.requires_login() def students(): form = form=SQLFORM.factory(db.person, db.address) cities_list = db(db.cities.id>0).select(db.cities.ALL) address_type_list = db(db.address_type.id>0).select(db.address_type.ALL) person_list = db(db.person.id>0).select(db.person.ALL) if

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Rodrigo Gomes
@auth.requires_login() def students(): form = form=SQLFORM.factory(db.person, db.address) cities_list = db(db.cities.id>0).select(db.cities.ALL) address_type_list = db(db.address_type.id>0).select(db.address_type.ALL) person_list = db(db.person.id>0).select(db.person.ALL) if form.process().accep

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Rodrigo Gomes
i really think its a bug in form.factory, i tried modify by the controller too, like form.element(_id=no_table_cities).update(_class="selectpicker") and no sucess. terça-feira, 21 de Agosto de 2018 às 13:31:38 UTC-3, Rodrigo Gomes escreveu: > > @auth.requires_login() > def students(): > form =

[web2py] Cookies and redirect

2018-08-21 Thread Carlos Correia
Hi, Is it possible to set a cookie and redirect to another page in the same controller? If yes, how? I tried this simple example but the cookie is lost if I use the redirect... def cookies2(): cookie_name = 'name' cookie_value = 'value' response.cookies[ cookie_name ] = cookie_value r

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Jim S
Have you tried just displaying the form in your view using {{=form}}. Then add a requires=IS_IN_DB to the fields in your model. I'd do this just to make sure that SQLFORM.factory is working as expected. Make sense? http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-va

Re: [web2py] custom form web2py not work when i use selectpicker

2018-08-21 Thread Carlos Correia
Às 00:39 de 17-08-2018, Rodrigo Gomes escreveu: > > Good evening, folks, I've come here to unveil a mystery, I'm developing an > application with web2py, (framework that I use about 3 years ago) > > I am using sqlform.factory, passing 2 tables, being that I do this to fill in > a single form, table

Re: [web2py] custom form web2py not work when i use selectpicker

2018-08-21 Thread Rodrigo Gomes
thanks, but the problem is not adding the selectpicker in the selects, the problem is that by adding it to any select it does not recognize the input data terça-feira, 21 de Agosto de 2018 às 14:17:48 UTC-3, Carlos Correia escreveu: > > Às 00:39 de 17-08-2018, Rodrigo Gomes escreveu: > > > Good

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Rodrigo Gomes
I just tested with {{= form}} and it really worked, so the problem is between {{=form.hidden_fields()}} terça-feira, 21 de Agosto de 2018 às 13:46:55 UTC-3, Jim S escreveu: > > Have you tried just displaying the form in your view using {{=form}}. > Then add a requires=IS_IN_DB to

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Jim S
Ok, now that we know the problem isn't with SQLFORM.factory lets look closer at the generated html when using {{=form}} vs the html you typed in. Specifically: {{for t in address_type_list:}} {{=t.type}}

[web2py] Re: session data type changed after upgrade to 2.17.1

2018-08-21 Thread icodk
Turned out that after the upgrade the form.vars.end_date and form.vars.end_date(both defined as type 'date') returns a data type str instead of a 'date' type The form definition is: form = SQLFORM.factory( Field('start_date', 'date', label=T('Date range: ')) ,Field('end_date', 'date'

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Rodrigo Gomes
jim, thank you for you time, what is causing the error is, if i use {{=form}} my code works, but if i use the form.custom, my code not work, if i remove form.element(_id='no_table_cities').update(_class='selectpicker') in my controller, form custom work again, so i have not idea about what is

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Jim S
I'm not aware of 'selectpicker'. What does it offer that the default select widget doesn't? I'm guessing you're also aware that you can override all of that bootstrap form style by creating your own formstyle and specifying it on SQLFORM.factory(formstyle=my_formstyle) call. I'm not sure if t

Re: [web2py] custom form web2py not work when i use selectpicker

2018-08-21 Thread Carlos Correia
Às 20:41 de 21-08-2018, Rodrigo Gomes escreveu: > thanks, but the problem is not adding the selectpicker in the selects, the > problem is that by adding it to any select it does not recognize the input > data > > terça-feira, 21 de Agosto de 2018 às 14:17:48 UTC-3, Carlos Correia escreveu: > >

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Peng Wang
Did you include all the necessary files? .selectpicker() is a function defined under bootstrap-select lib and not in core bootstrap library,hence you need to include that library as well //silviomoreto.github.io/bootstrap-select/javascripts/bootstrap-select.js //silviomoreto.github.io/bootstrap

[web2py] Re: custom form web2py not work when i use selectpicker

2018-08-21 Thread Anthony
It seems selectpicker is causing a change in what gets sent to web2py. In the browser developer tools, can you check what form data gets sent to the server with and without selectpicker enabled? Maybe that will provide a clue. Anthony On Tuesday, August 21, 2018 at 4:42:30 PM UTC-4, Rodrigo Go

[web2py] Re: Cookies and redirect

2018-08-21 Thread Anthony
On Tuesday, August 21, 2018 at 12:37:16 PM UTC-4, Carlos Correia wrote: > > Hi, > > > Is it possible to set a cookie and redirect to another page in the same > controller? > > If yes, how? I tried this simple example but the cookie is lost if I use > the redirect... > > def cookies2(): > cook