[web2py] Streaming pdf in a browser

2020-09-24 Thread lcham...@gmail.com
Hi, i have a controller with this : response.headers['Content-Disposition'] = 'inline; filename=%s' % request.vars.filename to force streaming the pdf file , and i do not why it does not work .. any idea ? Thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

[web2py] SQLFLORMGRID

2020-10-01 Thread lcham...@gmail.com
Hello, i use sqlformgrid and like this : controller: def art_manage(): records= SQLFORM.grid(query=db.t_art,maxtextlength = 40,deletable=False,create=True, fields=[db.t_art.f_name, db.t_art.f_team, db.t_art.f_tit]) return dict(records=records) view: {{=records}} the records displayed

Re: [web2py] SQLFLORMGRID

2020-10-05 Thread lcham...@gmail.com
-abstraction-layer#callbacks-on-record-insert-delete-and-update > > > Cheers > Andrew > > ___ > *www.TenOutOfTen.org* <https://www.TenOutOfTen.org> > roge...@gmail.com > (+95) 09 250018669 <+95%209%20250%20018%20669> (Myanmar) > >

[web2py] Re: SQLFLORMGRID

2020-10-05 Thread lcham...@gmail.com
r FORM and SQLFORM. " > > So, when you declare the grid, you link the function that you want to run > to: oncreate=myoncreate > > On Thursday, October 1, 2020 at 9:07:34 AM UTC-5 lcham...@gmail.com wrote: > >> >> Hello, >> i use sqlformgrid and like this :

Re: [web2py] SQLFLORMGRID

2020-10-08 Thread lcham...@gmail.com
> > Cheers > Andrew > > ___ > *www.TenOutOfTen.org* <https://www.TenOutOfTen.org> > roge...@gmail.com > (+95) 09 250018669 <+95%209%20250%20018%20669> (Myanmar) > > > > On Fri, 2 Oct 2020 at 00:07, lcham...@gmail.com > wrote: &

[web2py] Re: SQLFLORMGRID

2020-10-08 Thread lcham...@gmail.com
good idea it works , thank you i have to practise more Le jeudi 8 octobre 2020 à 16:05:39 UTC+2, Alex Beskopilny a écrit : > maybe you could do this > > def art_manage(): > > if len(request.args) >= 2 and ('new' == request.args[0]): ># some code >return ' create !!!

[web2py] ckEditor v4.5.7 function download

2020-10-08 Thread lcham...@gmail.com
Hello, i don't know why , i can upload a pic from a form using ckeditor /app/download/plugin_ckeditor_upload.upload.a7dc4103618b052d.57494e5f32303230313030315f31365f35325f31305f50726f2e6a7067.jpg i submit the record is registered, , i visualise the view , the code source is correct and the p

[web2py] Re: 255

2020-11-04 Thread lcham...@gmail.com
Did you find a solution ? thanks Le dimanche 29 mars 2020 à 17:13:14 UTC+2, and...@gmail.com a écrit : > I have this problem using web2py 2.18 with pyrhon 3.8 and mysql. > When I log in int the app it happens this error: > 255 > > I don't know id it's an error regarding mysql > Versione > w

[web2py] Mysqld connection 255 MySQL Server 5.7

2020-11-04 Thread lcham...@gmail.com
I moved an app/db to a new server. This apps connects perfectly, i am sure the credentials are good, the auth method is mysql_native_password as before. I tried to change the drivers method .. i cannot connect, what ca i do, i search in the forum, no response, thank you very much, i am in the .

[web2py] Re: Mysqld connection 255 MySQL Server 5.7

2020-11-04 Thread lcham...@gmail.com
forget it : solved using python3 -m pip install PyMySQL Sorry for disturbing Le mercredi 4 novembre 2020 à 11:51:10 UTC+1, lcham...@gmail.com a écrit : > I moved an app/db to a new server. This apps connects perfectly, i am sure > the credentials are good, the auth met

[web2py] web2py cannot import csv return strings not byte

2021-01-05 Thread lcham...@gmail.com
*To Reproduce* Steps to reproduce the behavior: 1. Create a new project(*New simple application*). 2. Go to Models, and edit *db.py* Add this: db.define_table('contacts', Field('first_name'), Field('last_name'), Field('company_name'), Field('address'), Field('city'), Field('county'),

[web2py] set default value of row for foreign key

2021-01-21 Thread lcham...@gmail.com
Hello , i have 2 tables like this : Model db.define_table('t_plasmids', Field('f_protein', type='string', comment="50 characters max", label=T('Protein')), Field('f_plasmid_name', type='string', comment="100 characters max", label=T('Plasmid Name')), migrate = Tru

[web2py] Re: Need a tutorial on py4web

2024-12-07 Thread lcham...@gmail.com
Sorry, i just start to move to py4web and if i follow the doc but : if you create an application from scaffold, well, you have a set of files and you have to write your functions in controllers.py, but you don't know why. If you try to create (as in web2py) a toto.py, well, py4web never finds

[web2py] Re: web2py -> py4web

2024-12-07 Thread lcham...@gmail.com
I've just come from web2py and I find the py4web doc very incomplete, even for trivial things like: if you create an application from scaffold, well, you have a set of files and you have to write your functions in controllers.py, but you don't know why. If you try to create (as in web2py) a t