[web2py] Uservoice

2015-03-21 Thread KPlus
Has anyone checked Uservoice ? There are abandoned ideas/requests I'm not sure if web2py-developers are watching ! https://web2py.uservoice.com/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/

[web2py] Dropbox in the book

2015-03-21 Thread Gray Kanarek
The book has the following instructions for integrating Dropbox: from gluon.contrib.login_methods.dropbox_account import use_dropbox use_janrain(auth,filename='private/dropbox.key') mydropbox = auth.settings.login_form Should that be use_dropbox in L2 instead of use_janrain (since you imported

[web2py] Re: returning data to web page div (Partly Solved)

2015-03-21 Thread Garry Smith
Hi with your help I have manage to get the links working using the following code:- def artist(): rows = db().select(db.media.artist,db.media.id, groupby = db.media.artist) links = map(lambda row:A(row.artist, callback=URL('album',vars=dict(id=row.id)), target='album'), ro

[web2py] Re: Where do upload files get stored?

2015-03-21 Thread Niphlod
Beware..something is wrong with your usage of os.path.join. All the arguments passed should not have ANY "path separator" inside, that's the whole deal of os.path.join. Else, you may just concatenate strings by hand!!! >>> import os >>> os.path.join('a', 'b', 'c') 'a/b/c' >>> os.path.join('

[web2py] Re: sessions in redis logout error

2015-03-21 Thread Niphlod
fixed https://github.com/web2py/web2py/pull/864 On Saturday, March 21, 2015 at 8:30:41 PM UTC+1, Niphlod wrote: > > it's a bug. could you please file it on github issues so it gets tracked ? > > On Saturday, March 21, 2015 at 4:56:42 PM UTC+1, Rod Watkins wrote: >> >> Hi all, >> >> Has anyone run

[web2py] Re: returning data to web page div

2015-03-21 Thread Garry Smith
Hi Thanks for your reply. This is doing the same, as what mine was returning Your is also returning a full page with all the response.menu from top, the Main Page Title etc and putting it in the div. Also yours is retuning all the links on one line, I would line between each link. I've been t

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Niphlod
This last post is a dream come true for my boss. Glossary: - "developer" --> someone that can create logics in programs, coding in some programming language - "sysop" --> someone who knows inside out every bit of the pieces the "developer" uses to make programs work - "devop" --> someone who is

[web2py] Re: Where do upload files get stored?

2015-03-21 Thread pumplerod
I found the problem. In my models file I had declared the model to have uploadfolder='uploads/' Evidently this does not get overridden when I declare the field in the SQLFORM.factory On Saturday, March 21, 2015 at 4:04:59 PM UTC-5, pumplerod wrote: > > It seems part of my error was in using

[web2py] Re: Where do upload files get stored?

2015-03-21 Thread pumplerod
It seems part of my error was in using the "/" before the "uploads/" This generates the correct path... os.path.join(request.folder,'uploads/') this does not... os.path.join(request.folder,'/uploads/') that said however. They each place the uploaded file into a root level uploads director

[web2py] Re: Where do upload files get stored?

2015-03-21 Thread pumplerod
Well, I found the images. they are in the parent directory of applications. meaning the root web2py directory. I'm not sure why. is seems as though the os.path.join() is not actually building the correct path. Perhaps request.folder() is not being called correctly? On Saturday, March 21,

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Lisandro Rostagno
Thank you Massimo, I will try that, I think I'm going to "play" a little on a testing server and then go to production. One thing that I was concerned about was the assignment of resources. Considering that our clients choose a "plan", I need to limit resources per every website accordingly to the

[web2py] Re: PythonAnywhere performance is significantly slower than locally

2015-03-21 Thread Massimo Di Pierro
I have not experience performance issues on pythonanywere but I have not used MySQL. One possibility is that on your local machine the database and the server run on the same machine. On pythonanywhere (and most hosting) they may run on different machines therefore you have network latency. Mor

[web2py] Re: auth define_tables username=False not working on GAE

2015-03-21 Thread Massimo Di Pierro
It is a feature. ;-) If the auth_user table has a username, it uses the username to ID the user instead of the email. Mind that on-login you can always pass the email in place of the username and it will work. Anyway, if you do not want this and you want a field called username that does not

[web2py] Re: To send a registration confirmation by email.

2015-03-21 Thread Massimo Di Pierro
in db.py there is this: mail = auth.settings.mailer mail.settings.server = ... mail.settings.sender = ... mail.settings.login = ... On Saturday, 21 March 2015 15:21:09 UTC-5, manuscriptum wrote: > > Hello everyone! > Please tell me where I can web2py configure a mail server? > To send a regi

[web2py] Re: web2py book, upload field

2015-03-21 Thread Massimo Di Pierro
Limited manpower. If you send me a paragraph I will add it immediately. On Saturday, 21 March 2015 15:21:09 UTC-5, Val K wrote: > > There is nothing about custom_store/custom_retrieve options of upload > field in the web2py book. > Why? > -- Resources: - http://web2py.com - http://web2py.com/bo

[web2py] PythonAnywhere performance is significantly slower than locally

2015-03-21 Thread NeoToren
My website is using MySQL and consists mostly of queries and simple display of textual results. No images or fancy CSS. Locally, queries response time is *sub second*. Deployed to PythonAnywhere (using the couple of basic efficiency tricks in the book) - and the same queries may take *7-8 second

[web2py] auth define_tables username=False not working on GAE

2015-03-21 Thread Sébastien Loix
Hello, I can't get the username=False inside the auth.define_tables to work while developing on GAE locally. I need to add a custom field "username" in the auth table that I do like this: auth.settings.extra_fields['auth_user'] = [Field('username', length=128, default="", unique=True)] then

[web2py] Re: Secure view {{code}} - disabling import and dangerous commands

2015-03-21 Thread Val K
{{code}} - it's not pure Python, it's using Python as template language >From {{code}} it's possible to access all web2py environment (session, request and etc. ) I think, If you want to execute users' code at your server, you have to execute it as separate process under truncated system account

[web2py] Re: Multi language site

2015-03-21 Thread olivier hubert
Thanks for the help Gael (merci) :) Finally I try another method as routers. Massimo and other talk about that in another post and a sample can be found in the admin page. I add in my view a select with all language supported by my application. My application need to be compatible with ie9 so I

[web2py] To send a registration confirmation by email.

2015-03-21 Thread manuscriptum
Hello everyone! Please tell me where I can web2py configure a mail server? To send a registration confirmation by email. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Rep

[web2py] web2py book, upload field

2015-03-21 Thread Val K
There is nothing about custom_store/custom_retrieve options of upload field in the web2py book. Why? -- 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] to send e-mail notifications

2015-03-21 Thread manuscriptum
Hello everyone! Please tell me where is configured to send e-mail notifications? manuscriptum -- 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 receiv

[web2py] Re: returning data to web page div

2015-03-21 Thread Massimo Di Pierro
I am not sure I fully understand but I think you want this: def artist(): rows = db().select(db.media.artist,db.media.id, groupby = db.media.artist) links = map(lambda row:A(row.artist, callback=URL('album',vars=dict(id=row.id)), target='album'), rows) return dict(links=DIV(*lin

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Massimo Di Pierro
You can definitively handle this with one single web2py instance and you would save lots of memory (not CPU, only memory, but it may be worth). Since you are using this in production, my recommendation is to use nginx and use nginx.conf to map subdomains into apps. Each domain would have it pan

[web2py] Re: SQLFORM with IS_IN_SET(..., multiple=True) not SELECTED in FORM

2015-03-21 Thread Massimo Di Pierro
Can you show us more of your define_table and form code? On Saturday, 21 March 2015 01:49:44 UTC-5, Robin Manoli wrote: > > Hey Val! > Yes I'm sure. All the other values are loaded correctly, and it works if I > remove multiple=True. > > Den lördag 21 mars 2015 kl. 00:48:30 UTC+1 skrev Val K: >>

[web2py] Re: Where do upload files get stored?

2015-03-21 Thread Massimo Di Pierro
I am confused too. Given your form, it should go on the filesystem. You use a SQLFORM.factory, not a SQLFORM therefore there is no DB IO. Since you can download it it means you have the filename, you can try search for it. Perhaps the 'upload/' instead of 'upload' is creating a problem? On Satu

[web2py] Re: last minute web2py hackaton

2015-03-21 Thread Paolo Valleri
+1 On Friday, March 20, 2015 at 5:57:37 PM UTC+1, Niphlod wrote: > > damn. I should have waited all those months. > > muhahahaha! > > let's see if money speed up things. > > BTW; I'd have included that with the fix should be included a regression > test to make it never happen again, but that's

[web2py] Re: sessions in redis logout error

2015-03-21 Thread Niphlod
it's a bug. could you please file it on github issues so it gets tracked ? On Saturday, March 21, 2015 at 4:56:42 PM UTC+1, Rod Watkins wrote: > > Hi all, > > Has anyone run into this problem? If you use Redis to store sessions, when > logging out, the following error is thrown. I'm looking into

[web2py] Re: several vars in page

2015-03-21 Thread Niphlod
the same way you want a new_dict to store anything inside an existing_dict, and then some other values. What you're trying to do >>> existing_dict = {'a' : 1, 'b' : 2} >>> wrong_way_dict = dict(c=4, existing_dict) File "", line 1 SyntaxError: non-keyword arg after keyword arg >>> existing_

[web2py] returning data to web page div

2015-03-21 Thread Garry Smith
Hi I'm trying to return the some links to a div. I have made links with some information from the database and using the A htlm helper. The problem I am having is getting the data back correctly, I am getting the links back correctly, but I am being sent a full web page with the links, which is

[web2py] sessions in redis logout error

2015-03-21 Thread Rod Watkins
Hi all, Has anyone run into this problem? If you use Redis to store sessions, when logging out, the following error is thrown. I'm looking into i8t myself, but thought others may have run into it as well. Thanks Rod 'MockQuery' object has no attribute 'delete' Versionweb2py™Version 2.9.12-sta

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Lisandro
Hello Massimo. I'm not really sure about my answer, but that's a question I've asked myself in the past. Let me clarify: in my company we offer auto-administrable websites (for newspapers, magazines, organizations, bloggers). What we have is a main web2py app called "panel", that is pretty much

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Lisandro
Problem solved! The problem was, in effect, the large quantity of records on the web2py_session_init table. So I did a manual delete on the table, and then I could successfully add the sessions2trash.py script to the cron configuration. So far, everything is working ok. Thank you very much Nip

[web2py] Re: Secure view {{code}} - disabling import and dangerous commands

2015-03-21 Thread Leonel Câmara
I think it's a better idea to just implement your own little DSL, it's very easy in python and much more secure. -- 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 Issue

[web2py] Re: Show busy during AJAX?

2015-03-21 Thread cem
I prefer to use the below scripts; $(document).ajaxStart( function () { $(".aloading").show(); }); $(document).ajaxStop( function () { $(".aloading").hide(); }); put somewhere above body for example; and css .aloading { display: none; border-style: non