[web2py] Re: redis server set up

2017-10-08 Thread 黄祥
when developing on laptop, installed redis (just 1) on vm (vagrant with linux os) with configuration taken from the book : ref: http://web2py.com/books/default/chapter/29/13/deployment-recipes#Caching-with-Redis http://web2py.com/books/default/chapter/29/13/deployment-recipes#Sessions-in-Redis

[web2py] Re: Understanding the download function

2017-10-08 Thread Andy W
Hi Rudy Have you tried re-defining the download function to include the path to the location you have used for storing the uploaded files? For example, in my case I ended up with the following in my controller: def download(): import os file_path = os.path.join(request.folder,'uploads',

[web2py] redis server set up

2017-10-08 Thread Alex Glaros
1. When downloading your own redis server, where do you download it to? E.g., if using pythonanywhere.com, where would you install it? 2. If developing on your laptap, do you download another copy of redis on your laptop to test with, and keep another copy on a host? 2. If using redis labs

[web2py] Re: SQLFORM.smartgrid() custom field representation breaks exporting functions

2017-10-08 Thread 黄祥
had you already tried to put the copy function in sqlform.grid(links) ? best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You

[web2py] Re: web2py and pouchdb

2017-10-08 Thread 黄祥
tested with min app from js on views side, but the result is not expected, the form field name store in indexeddb {{=request.vars.your_name}} as is not the form field value *controllers/default.py* def pouchdb(): form = SQLFORM.factory( Field('your_name', requires = IS_NOT_EMPTY() )

[web2py] SQLFORM.smartgrid() custom field representation breaks exporting functions

2017-10-08 Thread Francisco Ribeiro
hi, I have customized one of the fields of my SQLForm whereby instead of displaying its long content, it shows a small button that copies its content into the clipboard, as follows: db.mytable.myfield.represent = lambda value, row: TAG.button(SPAN(DIV( row.myfield,

[web2py] Re: update_or_insert -- I end up with duplicates

2017-10-08 Thread pbreit
I'm surprised this would be a problem unless you have a very high traffic service or there's something else going on with your code. If it really is a problem, another option you could consider is a new column with enforced uniqueness that stores some sort of mashup of the two fields ( as

[web2py] Re: Understanding the download function

2017-10-08 Thread Rudy
Hi Andy / Anthony, May i ask how you have addressed the multi-tenant requirement separating all those uploaded files from different tenant to keep track of their storage usage. I want to use the client id as part of the uploadfolder, it worked as a test below when I defined the uploadfolder