[web2py] Re: How to use web2py auth using JavaScript+ajax?

2012-04-05 Thread thstart
2 2:22:42 AM UTC-4, thstart wrote: >> >> Thank you, could you please post an example? >> > > Perhaps someone else has a full working example. You just need a form on > the page that gets posted via Ajax (see > http://web2py.com/books/default/chapter/29/11#The-a

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-15 Thread thstart
I used your suggestion for 'reset_email_lower' from this thread but it doesn't works with register. It works for login/reset_password but not with register. https://groups.google.com/forum/#!topic/web2py/1QjBUy62jP8 I added this code (reset_email_lower) to registration too. But I checked the data

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-15 Thread thstart
could you please post a code how to that for register especially?

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-15 Thread thstart
Thank you, I will test it.

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-15 Thread thstart
great, I set this globally where the auth_user table is defined. On register got the message *'value already in database or empty'* how to change it?

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-15 Thread thstart
Also, when logged in - how to make possible for the user to change his email?

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-15 Thread thstart
I am using email/password as a login. After login I want to have an option for the user to be able to change his email used as a login. say the user logs in with myem...@gmail.com/ after log in he clicks on a button (change your email), a form is present where he enters his new email as newem.

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread thstart
OK I added this code after database definition: db.auth_user.email.requires.insert(0, IS_LOWER()) So it is always present with register and login. Now register is working as expected - e.g. if I create first an account with lower case email and then try to create an account with same email bu

Re: [web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread thstart
How to perform a function to strip out white spaces before registration?

Re: [web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread thstart
the issue is I see with the debugger in the case of register - the validator executes after register telling 'Invalid Email' when I copy/paste an email with space after the email itself. I want to prevent this to happen.

[web2py] How to make a function to download a file?

2011-12-22 Thread thstart
I want the visitors to be able to download a CSV file. here is my code: def download(): response.headers['Content-Type'] = 'text/csv' attachment = 'attachment;filename=' + file+ '.csv' response.headers['Content-Disposition'] = attachment content = ',...

[web2py] GAE+email+a list of CC

2011-12-24 Thread thstart
I want to send an email to multiple users so each of them to reply to all recipients in the message. I am using GAE and set a CC=[ema...@gmail.com,ema...@gmail.com...] but only the 'to' email is received and in CC I see CC=None. What is wrong?

[web2py] Re: GAE+email+a list of CC

2011-12-24 Thread thstart
Here is the code: cc = [] for to_name, to_email_addr in to_email_addrs: cc.append(to_email_addr) result = *send_email_message_web2py*( reply_to=reply_to, reply_to_email_addr=reply_to_email_

[web2py] How to optionally check IS_EMAIL if not blank?

2011-12-24 Thread thstart
I have this form: form = SQLFORM.factory( Field('first_name', requires=IS_NOT_EMPTY() ), Field('last_name', requires=IS_NOT_EMPTY() ), Field('email_work', requires=[IS_EMAIL(error_message='invalid email!')]), Field('email_home', requires = IS_EMAIL(error_message='invalid email!')), submit_button =

[web2py] Re: How to make a function to download a file?

2011-12-27 Thread thstart
I don't use a database to create the CSV content but generate is as a comma delimited text. Also I want to set the file name to be downloaded. I don't see how to do it from the book. This line has to be changed in order to work: raise HTTP(200,str(content), **{'Content-Type':

[web2py] How to add link for downloading CSV file with specifying filename

2011-12-27 Thread thstart
I generate CSV content ready to use as a .csv file; don't use a database and have a function to do that. I want this .csv file to be available for download after click and the filename to be set from the application. How to do that in web2py?

[web2py] Re: How to make a function to download a file?

2011-12-28 Thread thstart
*As I see I need this:* * stream = cStringIO.StringIO() * * return stream.getvalue() * * * *I have a ready to go content as a string in a variable:* *content = * '.'* * So how to put this string in a stream? *My code is:* * * *def download(): response.headers['Content-Type'] =

[web2py] Re: How to make a function to download a file?

2011-12-28 Thread thstart
a note I need to use Python 2.5. On GAE Python 2.7 is extremely slow.

[web2py] Re: How to make a function to download a file?

2011-12-28 Thread thstart
file is composed dynamically - I get it from request - it is send like ?file=name and I get it from there. can you post the code you just tried?

[web2py] Re: How to make a function to download a file?

2011-12-28 Thread thstart
You mean my original code is working? With IE it is not. What browser you are using? In IE nothing comes for download.

[web2py] email/password Login cannot enter longer emails like 30 letters.

2012-01-03 Thread thstart
I defined email/password only Login. cannot enter longer emails like 30 letters. I see in auth_user Field('email', length=512, type='string', default='', label=current.T('Email')), What is wrong?

[web2py] Re: email/password Login cannot enter longer emails like 30 letters.

2012-01-03 Thread thstart
problem solved - it was in the widget - thank you!

[web2py] How to implement http_user_agents statistics?

2012-01-03 Thread thstart
I am recording http_user_agents info like this: *value:* [u'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)', u'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7', u'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;

[web2py] How to do that: Verifying email account ownership

2012-01-05 Thread thstart
Verifying email account ownership - I am brainstorming for the best way to know email address is owned by an user. Something like that - a user enters email address, my app generates a code and sends an email message with a link with this code, the user clicks and comes to my app which thus verif

Re: [web2py] How to do that: Verifying email account ownership

2012-01-05 Thread thstart
I mean a separate functionality from auth. Like the user is posting a list of email addresses in a text box and my app gets them and sends verification email messages to these accounts. Once the user clicks the links to go to my app and my app to mark this email verified and store it in a users' s

[web2py] How to perform a function in a template?

2012-01-11 Thread thstart
I need to perform a function in a template, something like this: {{for name_first in names_first:}} {{=name_first[0]}} {{*urllib.quote_plus*(name_first[0])}} {{=name_first[1]}} {{pass}} How to do that?

[web2py] How is the best way to export/import auth_user database?

2012-01-15 Thread thstart
I need to migrate to new server. How is the best way to export auth_user data from the old and import to the new database and all username/passwords to be used with no change?

[web2py] Re: How is the best way to export/import auth_user database?

2012-01-16 Thread thstart
yes, how to have same ID's?

[web2py] Re: How is the best way to export/import auth_user database?

2012-01-16 Thread thstart
It is a complex case. I am using GAE and already having users. Needed to change the database structure, so I need to move to new GAE app. The simplest option is to re-invite the users but they are 100s. They will need to re-register again using email/password. Probably not big deal for them but

[web2py] Re: How is the best way to export/import auth_user database?

2012-01-16 Thread thstart
you are correct - if I have a way to use GAE to populate auth table - this is the best way, but how to do that?

[web2py] Ho to implement a SignIn with multiple verified email addresses.

2012-01-21 Thread thstart
I need to implement the following. Basically a SignIn with multiple verified email addresses. 1. A first time email/password SignUp. 2. Registered emails - send verification to the email account and verified from the user after click. (this is done). 3. Each of the registered emails

[web2py] How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
I need to modify the look and text of: Remember me (for 30 days) How to do that?

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
Actually I need just to change Remember me (for 30 days)" to "Remember me(for 30 days)"

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
Thank you Anthony, will try it!

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
It worked. Now I want to change *formstyle* and default labels: 1) E-mail to Email 2) The message in red below Email: Invalid email to Please enter a valid email address. 3) The message in red below password: too short to Please enter a valid password. too short is actually misleading because I

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
This is working: auth.settings.formstyle ='divs' This is not working (it remains E-mail): auth.messages.label_email = 'Email' Remember me (for 30 days works) - but there is a space above it up to password - how to remove it?

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
Also on Sign Up form I got a message 'too short' below the Password field - in the book link there is not correspondent function to change it. Additionally, tried to change auth.messages.invalid_email = 'Please enter a valid email address' But it still shows 'Invalid email'

[web2py] How to get unencrypted auth password?

2012-01-24 Thread thstart
I need to unencrypt auth password having the key. How to do that?

[web2py] Re: How to get unencrypted auth password?

2012-01-24 Thread thstart
I needed to transfer accounts to a new server. It turns out it is not needed.

[web2py] Re: How to get unencrypted auth password?

2012-01-24 Thread thstart
it was not needed to decrypt I wanted to say.

[web2py] Re: How to get unencrypted auth password?

2012-01-24 Thread thstart
Hi Massimo, Could you please comment on related question? https://groups.google.com/forum/#!topic/web2py/DXQ9hBAuVDA Tanks in advance, --Constantine

[web2py] Re: Ho to implement a SignIn with multiple verified email addresses.

2012-01-24 Thread thstart
the simplest way to implement without changing auth table is: 1) user logs in with email/password 2) my app checks if login passed through 3) if not my app checks if the email entered in login matches a list in a different table. 4) if it matches, it checks the password if matches in auth tabl

[web2py] How to use web2py auth using JavaScript+ajax?

2012-03-29 Thread thstart
I need to do a major rework in order to move client-side functionality to the browser and using Javascript to get more responsive client side experience with no refresh etc. That means web2py will give a rich server side functionality and all client work to be performed via JavaScript and Ajax. I

[web2py] Re: Python Negative Popularity

2012-03-29 Thread thstart
Guido is working for Google. GAE is having Python as a primary language - e.g. all libraries are implemented on Python first, Java and Go next. So we get a priority for Python. So from GAE point of view you better use Python to have an advantage. If not using GAE what alternatives we have? P

[web2py] Re: How to use web2py auth using JavaScript+ajax?

2012-03-29 Thread thstart
Thank you, could you please post an example? On Thursday, March 29, 2012 7:24:02 PM UTC-7, Anthony wrote: > > Now I need to make possible login/logout with just >> Javascript and Ajax snd calling web2py auth remotely. >> >> How to implement it so that I get the same functionality >> with sessions

[web2py] web2py + GAE 1.6.4 + NDB datastore API

2012-03-31 Thread thstart
GAE 1.6.4 with support for the new NDB datastore API. What are the plans to use it in web2py? GAE Version 1.6.4 - March 27, 2012 http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes - The NDB datastore API is now generally available. For full release notes on the version 0.9.9