[web2py] SQLFORM uploads with uploadfs and Amazon S3

2014-10-03 Thread Mark Graves
Hey Everyone, Does anyone have experience using SQLFORM with Amazon S3 for upload fields? My standard SQLFORM(db.table,record) is not removing the S3 object for the uploaded file. It is properly uploading the file and getting the obfuscated filename. Is there another argument I'm missing or

[web2py] imap and google mail

2014-10-03 Thread Martin Weissenboeck
Hi, I have tried to use imap together with a gmail account: imapdb = DAL("imap://the.n...@gmail.com:the.passw...@imap.googlemail.com:993", pool_size=1) imapdb.define_tables() But there is no connection. I get: Failure to connect, tried 5 times ​Is it a problem to have two "@"s (one as part of

[web2py] Re: Replacing characters in a csv file from request.vars

2014-10-03 Thread Leonel Câmara
No, what I mean is, can I see the form you use to upload. And can you show me more of that controller and/or more of the ticket error. The error you're getting "global name 'cvsfile' is not defined" doesn't make sense to me. An alternative is to read the excel directly using xlrd ( http://www.

[web2py] Re: Replacing characters in a csv file from request.vars

2014-10-03 Thread Gael Princivalle
I'm creating the csv file like that. >From a CRM I export data in the only format available, Excel. >From Excel I export in CSV. After that I have to replace a lot of things inside the file. First "," with "." for decimal separator. ";" with "," for field separator "FALSO" with "0" "VERO" with "1"

[web2py] Re: use jquery mobile with image upload functionality in web2py - is a hack is necessary?

2014-10-03 Thread Rob Paire
I have been thinking about this problem, and it seems like a more elegant solution is to include an override method in the jquery.mobile plug-in layout file as described here: http://www.bennadel.com/blog/1624-ask-ben-overriding-core-jquery-methods.htm I will post back if I get something workin

[web2py] Re: Manual reset password link

2014-10-03 Thread Leonel Câmara
Oh, my solution is different as I completely stopped using args to send the key. I don't think it will have the same problem as the solution provided by Ricardo Pedroso. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: mssql legacy tables reference

2014-10-03 Thread Niphlod
what if you don't use requires=IS_EMPTY() ? On Friday, October 3, 2014 8:52:12 AM UTC+2, Alen Cerovic wrote: > > is there any resolution to this, any ideas, or are there plans to make it > work in future? > > Dana ponedjeljak, 29. rujna 2014. 12:26:11 UTC+2, korisnik Alen Cerovic > napisao je: >

[web2py] Re: Manual reset password link

2014-10-03 Thread Niphlod
I assume it's this one https://groups.google.com/d/msg/web2py/wljBn6rVHTo/rus7OnvMCO4J On Friday, October 3, 2014 5:38:37 PM UTC+2, Leonel Câmara wrote: > > Ok I removed it in my pull request. At least, in my manual testing, no > infinite loops happen: > > https://github.com/web2py/web2py/pull/5

[web2py] use jquery mobile with image upload functionality in web2py - is a hack is necessary?

2014-10-03 Thread Rob Paire
Hello all, I am working on an app using web2py and the jquery.mobile plug-in which I upgraded from v1.3.1 to v1.3.2. So far everything is working fine except for the image upload feature. I managed to solve the problem and enable the upload, but I had to hack the jquery.mobile-1.3.2.js source t

[web2py] Re: Manual reset password link

2014-10-03 Thread Leonel Câmara
Ok I removed it in my pull request. At least, in my manual testing, no infinite loops happen: https://github.com/web2py/web2py/pull/515 This way reset_password saves the key in request.vars so it doesn't have to worry about it's positioning in the args. I did completely ignore Auth.reset_passw

[web2py] Re: Replacing characters in a csv file from request.vars

2014-10-03 Thread Leonel Câmara
How are you creating your csv file input? Along with delimiter you can also change quotechar and quoting. -- 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) ---

Re: [web2py] Re: Replacing characters in a csv file from request.vars

2014-10-03 Thread Gael Princivalle
Thanks Leonel No it don't. >However, this is not necessary as you can send the delimiter to import_from_csv_file. So this may be enough: >db.products.import_from_csv_file(request.vars.csvfile.file, delimiter=';') Great but I need to replace other characters. -- Gael Princiva

[web2py] Re: Replacing characters in a csv file from request.vars

2014-10-03 Thread Leonel Câmara
Does this work? csvtxt = request.vars.csvfile.file.read() csvtxt = csvtxt.replace(';', ',') from cStringIO import StringIO db.products.import_from_csv_file(StringIO(csvtxt)) However, this is not necessary as you can send the delimiter to import_from_csv_file. So this may be enough: db.products.

[web2py] Replacing characters in a csv file from request.vars

2014-10-03 Thread Gael Princivalle
Hello all. I want to replace some characters in a CSV file that I get from the user. csvfile = request.vars.csvfile.file #Replacing field separator ';' by ',' csvfile = csvfile.replace(';',',') db.products.import_from_csv_file(csvfile) Like that web2py give me this error message: global name 'cv

Re: [web2py] web2py.py -G configure issues? Trouble with /admin on GAE

2014-10-03 Thread Lucas Geiger
I'm not having luck with that. Can you post your yml file here? Another question: have you tried using GAE's release pipeline with Github? It seems the yml is not valid and fails. Wondering if it's related. See here: https://groups.google.com/forum/#!topic/web2py-developers/ldksNnV7EeQ On Fri, Oc

Re: [web2py] Re: Limit SQLFORM.grid results

2014-10-03 Thread Niphlod
if your backend needs tons of times to extract 50 records (no matter what the page is) there's a problem. Grid has not. If ou want to show your users a set of records, just pass to grid a query instead of the entire table. On Friday, October 3, 2014 12:50:57 PM UTC+2, Narūnas Krasauskas wrote: >

Re: [web2py] web2py.py -G configure issues? Trouble with /admin on GAE

2014-10-03 Thread Miguel Goncalves
Hi I cleared the cache and also tried running in IE and Chrome. Everything is still working properly for me. -Miguel On Thu, Oct 2, 2014 at 9:57 AM, Lucas Geiger wrote: > Hi Miguel, this seems to break the rest of app for me, including welcome: > > https://www.dropbox.com/s/sa7s3yp5xy47ckb/S

[web2py] Re: Sharing a site, some thoughts and looking for feedback

2014-10-03 Thread Massimo Di Pierro
very interesting. I will look at it in detail asap On Wednesday, 1 October 2014 15:20:19 UTC-5, Russ King wrote: > > I have a site at http://netdecisionmaking.appspot.com and related code > at https://github.com/NewGlobalStrategy/NetDecisionMaking. It demonstrates > an asynchronous group decisi

[web2py] Re: Extending web2py with a user management module.

2014-10-03 Thread Massimo Di Pierro
Part of this may already be implemented http://www.web2py.com/books/default/chapter/29/09/access-control?search=Application%20Management%20via%20privileged%20users#Application-Management-via-privileged-users--Experimental- I have an app that may be of interest to you: http://experts4solutions.com

[web2py] Re: Displaying QR Code PIL Image object

2014-10-03 Thread Massimo Di Pierro
is supposed to be a link to an image, not an image. If you want to inline the binary data you can try: import base64 encoded_qr_code = base64.b64encode(qr_code) and May not work on older browsers. On Wednesday, 1 October 2014 19:23:14 UTC-5, Ben Sharif wrote: > > I am generating a qr cod

[web2py] Re: Beginner question: separate styles of auth for two groups of users

2014-10-03 Thread Massimo Di Pierro
from gluon.utils import web2py_uuid db.define_table('token',Field('email'),Field('patient_code',default=web2py_uuid()[:4]) auth.settings.extra_fields['auth_user'] = [Field('patient_code ',writable=False)] if controller def user(): if request.args(0) == 'register': db.auth_user.pa

[web2py] Re: Database Access Layer (Not to be confused with database abstraction layer)

2014-10-03 Thread Massimo Di Pierro
If you use the latest web2py there is this code on welcome/controllers/default.py @auth.requires_login() def api(): """ this is example of API with access control

[web2py] Re: git push error

2014-10-03 Thread Massimo Di Pierro
This is an experimental feature and needs more debugging please open a ticket about this. On Tuesday, 30 September 2014 12:30:19 UTC-5, olivier hubert wrote: > > If I use the function git push from the admin console I get an error > > Traceback > > 1. > 2. > 3. > 4. > 5. > 6. > > Traceback (most

[web2py] Re: jquery ajax with server farm

2014-10-03 Thread Leonel Câmara
Wait a minute, the server lives on a server farm, but it's still a single server answering all your requests, correct? If that's the case you're definitely not having the same problem. Do you get any errors on the javascript console? Either way, you will have to give us something to work with (

Re: [web2py] Re: Default time for datetime picker widget

2014-10-03 Thread Massimo Di Pierro
There is a new undocumented feature in web2py: ASSIGNJ def index(): return dict(a={'whatever': ['you', 'want']}) # in view {{=ASSIGNJS(whatever=whatever}} now whatever is a JS variable. On Tuesday, 30 September 2014 09:00:20 UTC-5, Luca Liberti wrote: > > What I was looking for was exactly

[web2py] Re: Manual reset password link

2014-10-03 Thread Massimo Di Pierro
We tried to remove the check len(request.args)>1 but this resulted into an infinite loop. If you can help us debug that I have no objection to eliminate it. On Tuesday, 30 September 2014 04:14:31 UTC-5, Leonel Câmara wrote: > > That's definitely a bug. It's 1 because Auth.__call__ exposes all au

[web2py] Re: how can i write a PIL image object to response

2014-10-03 Thread Leonel Câmara
I think Image.save is available in GAE, I don't use it but I see lots of code examples on the web using Image.save with GAE. Anyway, you can use Image.tobytes(encoder_name='PNG') and write that to response.body. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:/

[web2py] Re: login security and some doubts

2014-10-03 Thread Massimo Di Pierro
> > 1. In the db.py file, I filled email and smtp mail settings and enabled > 'require email confirmation for registration', but it says connection > refused when trying to register a user account. Is that because I am on > pythonanywhere free account OR did I miss some other configuration sett

[web2py] Re: web ide keeps scroolling down

2014-10-03 Thread António Ramos
oops i just found "autoscroll" bottom right one down 2014-10-03 12:15 GMT+01:00 António Ramos : > hello > i find the webide very annoying for testing purposes. > > Every time i try to scroll up to see my previous code it automatically > scrolls down > Also i cannot up arrow to repeat command

[web2py] web ide keeps scroolling down

2014-10-03 Thread António Ramos
hello i find the webide very annoying for testing purposes. Every time i try to scroll up to see my previous code it automatically scrolls down Also i cannot up arrow to repeat commands. I dont find nothing new from my 2.9.5 comparing to 1.9.x Is webide forgotten from innovation? Thank you Antó

[web2py] Re: Limit SQLFORM.grid results

2014-10-03 Thread Narūnas Krasauskas
Hi, Same story here. I like *grid*, I like pagination, however I miss the feature of limiting the total number of rows in the output. In my case *grid* can easily generate over 1+m rows in the output, which when paginating by 50 rows per page, would produce 20k+ pages... Who needs that many page

[web2py] How to keep form values in case of submition failure

2014-10-03 Thread Jawad K.
Hi, I checked web2py book and found that we can use crud.settings.keepvalues = False for successful form submission but I want to know how can we use on failure..? I want to keep value of email address field on login page using *form=crud()*, currently when user try to login with invalid userna

[web2py] Re: translating the views

2014-10-03 Thread Leonel Câmara
Well you need to have separate things for things that are different. -- 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 received this message because yo

[web2py] Re: mssql legacy tables reference

2014-10-03 Thread Alen Cerovic
is there any resolution to this, any ideas, or are there plans to make it work in future? Dana ponedjeljak, 29. rujna 2014. 12:26:11 UTC+2, korisnik Alen Cerovic napisao je: > > Hi pn, I am expecting dropdown list of Mjesta when I add/edit record in > Partneri > tried putting 'requires' Field

[web2py] Re: how can i write a PIL image object to response

2014-10-03 Thread M.C. Botha
> > This does not work on appengine, there is no save method. > What is the appengine way of doing this? > from PIL import Image > def image(): > image = Image.new("RGB", (800, 600)) > response.headers['Content-Type']="image/png" > image.save(response.body, "PNG") > r

Re: [web2py] Re: Limit SQLFORM.grid results

2014-10-03 Thread Narūnas Krasauskas
Hi, Same story here. I like *grid*, I like pagination, however I'm missing the feature of limiting the total number of rows in the output. In my case *grid* can easily generate over 1+m rows in the output, which when paginating by 50 rows per page, would produce 20k+ pages... Who needs that many

[web2py] Re: jquery ajax with server farm

2014-10-03 Thread Jason Solack
I don't know that i'm having that same issue, i'm not actually using a database behind this app. i'm basically just sending some data to a python function and re-calling this function over and over to visualize the computing. I'm guessing that the issue is based on the fact that the production

[web2py] PythonAnywhere linking with domain at Godaddy

2014-10-03 Thread Satya Kishore
I created a web2py app. I brought a domain at godaddy. I even brought a hosting plan at pythonanywhere How can I get the domain redirect(relink) to pythonanywhere Thank You -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: translating the views

2014-10-03 Thread pang
Just a shortcut for {{=MARKMIN(T('**bold** this text'))}} ?? Any other advantage? El miércoles, 1 de octubre de 2014 18:52:43 UTC+2, lyn2py escribió: > > Translation Markmin is available. > > T.M('**bold** this text') > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentat

[web2py] Re: translating the views

2014-10-03 Thread pang
"ok,an interface in the backoffice for people to translate" is not hard, and I can embed a javascript editor so that they can use strong, em, bullets, etc! But then: how would you plug the other traslation engine into that one? I don't want to keep two separate things. Would you just copy-paste

[web2py] Re: Display PIL Image object

2014-10-03 Thread Leonel Câmara
@see https://groups.google.com/forum/#!topic/web2py/nCBVq9LBujA -- 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 received this message because you are