[web2py] where are Massimo's lesson sources?

2015-02-22 Thread danny
Hi, I'm watching Massimo's lessons, and was wondering if there are sources for the applications he is teaching thanks, danny -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: How to protect multiple posts to an action/url that is public?

2015-02-22 Thread Niphlod
in the former explanation, the thing that is missing is how can your action be aware of a malicious POST or a valid one. Since you have an hard requirement on no authentication, I don't see anything that would make your counters solid. The next best thing to do is to salt whatever variable you

[web2py] How to protect multiple posts to an action/url that is public?

2015-02-22 Thread Lisandro
I don't know exactly how to put this question. I have a blog and I want to count the visits to each blog post. I'm using cache.action, so I can't just increment some counter in the controller function. Then, I'm using javascript, so the cached view sent to every browser contains a small piece

[web2py] PDF view - set printing page size

2015-02-22 Thread Pavel
Hallo, I am making simple app for registrations and printing ID cards. I have simple pdf view. For instance: {{ import os from gluon.contrib.generics import pdf_from_html html = 'Today is: ' + str(request.now) =pdf_from_html(html) }} How to specify PDF page size for instance like credit card

[web2py] Re: SQLFORM very slow when table is big

2015-02-22 Thread André Kablu
Ok Thank you Niphlod, just found in manual this: If you want the field validated, but you do not want a drop-down, you must put the validator in a list.db.dog.owner.requires = [IS_IN_DB(db, 'person.id', '%(name)s')] hahaha sorry I was desperate to solve my problem.. Thanks! On Sunday,

[web2py] Re: SQLFORM very slow when table is big

2015-02-22 Thread André Kablu
Oh ok I got it... I just forgot about this b/c I use a manual autocomplete function... I was using IS_IN_DB just as a validator to make sure user don't try to input wrong value I think I`ll make one validator just for validate user... Do you think this is a good idea to add to the framework?

[web2py] invoice table missing in estore appliance

2015-02-22 Thread David Cash
Trying to run the estore appliance from https://github.com/mdipierro/web2py-appliances/tree/master/EStore results in an error Cannot resolve reference invoice in invoice_item definition. Sure enough the db1.py doesn't include an 'invoice' definition. Am I missing something? Thanks, David --

[web2py] Re: First post: Is this a bug?

2015-02-22 Thread Paolo Valleri
Can you post an example code? On Monday, February 23, 2015 at 4:37:31 AM UTC+1, Mat Miles wrote: I had a project that a number of tables that reference other tables using MySQL as the DB. I started another project using SQlite and the reference tables did not work. I went over and over the

[web2py] Why to always digitally sign ajax calls?

2015-02-22 Thread Robin Manoli
Hi! I'm wondering about this example from the book. Would it be less secure to just decorate two with @auth.requires_login, even if it's used for an ajax call? Or is it made like this to explicitly not require login for two? @auth.requires_login() def one(): return dict(link=URL('two',

[web2py] Re: where are Massimo's lesson sources?

2015-02-22 Thread Michael Beller
Not sure which applications you're referring to but many are here: https://github.com/mdipierro/web2py-appliances On Sunday, February 22, 2015 at 3:07:16 AM UTC-8, da...@mail.hebrew.edu wrote: Hi, I'm watching Massimo's lessons, and was wondering if there are sources for the applications he

[web2py] First post: Is this a bug?

2015-02-22 Thread Mat Miles
I had a project that a number of tables that reference other tables using MySQL as the DB. I started another project using SQlite and the reference tables did not work. I went over and over the project to see if I had a typo somewhere and could not find one. Finally I converted the table to

[web2py] Re: how to change grid name?

2015-02-22 Thread Oliver Holloway
Thanks! Now that I've build my own view, the grid variable is no longer displaying. The pluralized table name is still showing, so I did some reading, and found that this is a special property of the smartgrid gadget

[web2py] parse a json response in views

2015-02-22 Thread CC J
Hi I submit a request to the web2py server onchange=jQuery(gaslists).empty();ajax('prices', ['station_name'], 'shadow_clone'); My controller returns return XML(listing) In Firefox developer I receive a response {'ulp': '124.90', 'diesel': '126.90', 'autogas': '54.90'} I've a mental block

[web2py] Save variable in view from controllers and models for further math and other manipulation

2015-02-22 Thread Abhijit Chatterjee
This is not the right way to use web2py view but there is a html.py package that converts table and list to html automatically. I am trying to use that to see if it works out in web2py. More for an experiment than anything. This question may be more of a python question than web2py but here it