[web2py] Re: FPDF "ne commence pas par '%PDF-' "

2017-06-25 Thread Peter
Have been outputting pdfs for a while and this is what works for me ... note, I don't close the pdfpdf.close? but this allows the user to either open or save the file anywhere on their machine (Linux and Windows) pdf.cell( ln=0, h=9.0, align='R', w=178.0, txt="%s %s" % (

Re: [web2py] Re: vue.js

2017-06-25 Thread Ben Lawrence
This thread might be a little old but here is a way where you do not have to change web2py's delimiters, instead change Vue's delimiters. Problem is, with V2, you got to put all the scripts up front or you will see the strange delimiters as the page is loading. Here is main.html from that scaff

[web2py] Re: How to use FORM, INPUT to create a field with dropdown list?

2017-06-25 Thread Peter
Almost straight from the book but using my own db fields - tested and works... This controller in default.py def from_factory(): form = SQLFORM.factory(Field('your_name', requires = IS_IN_DB(db,db.person.id,'%(first_name)s'))) if form.process().accepted: response.flash = 'form

[web2py] How to force browser to cache css and js ?

2017-06-25 Thread António Ramos
I´m using this https://github.com/mjbeller/web2py-starter but i noticed that with only me as the single user so far it occupies daily from 200Mb to 300Mb bandwidth How can i tweek it to lower this value before going to production and explode my paid webfaction hosting ? Regards António -- Resou

[web2py] Re: cpython and web2py

2017-06-25 Thread Ron Chatterjee
Ok. I buy that. Speed is always a plus. Whats are the calls to run web2py with pypy? Can you share a link or an example? I cant seem to find that in the book. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] Re: cpython and web2py

2017-06-25 Thread Joe Barnhart
It's hard to take these questions seriously when you haven't described your speed problem. How is your website performing, and what are the bottlenecks you've found? Yes, many people, including myself, have experimented with pypy and web2py. If you're observant, you'll notice there are many m

[web2py] Re: Future of web2py

2017-06-25 Thread Ron Chatterjee
If the site gets 1000 clicks a day but cant handle 10k clicks a day, then its not web2py problem but success. The problem falls to the owner who cant handle the scaling beyond 1k clicks. In other words, if it scales that much fast, one should look at all the framework across the spectrum to see