Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-21 Thread Dwayne
Thank you. So I will make a 30 dollar donation to the project. But it still does not work. This is what I get when I enter an email address to invite someone : Traceback (most recent call last): File gluon/restricted.py, line 181, in restricted File

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-20 Thread Dwayne
Dear Massimo, Thank you very much. I'll send you the 30 dollars if it works :) I have a problem. I cannot compile : auth.settings.register_onvalidation.append(lambda form: db.invitation(token=form.vars.email) or form.errors.update({'email','not allowed'})) Why do I need :

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-20 Thread Massimo Di Pierro
My mistake, should have been form.errors.update({'email':'not allowed'}) By adding the error message it prevent the user from registering (because he does not have a valid token). You do not need to pay me for help in this list but I will not refuse a donation. ;-) Massimo On Jun 20, 8:16 pm,

Re: Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-19 Thread Ovidio Marinho
what solution you need? Ovidio Marinho Falcao Neto ovidio...@gmail.com 88269088 Paraiba-Brasil 2011/6/19 Dwayne dwaynebl...@gmail.com Thank you pbreit. Maybe I can pay 30 dollars to the first person who finds a solution. And the

Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-19 Thread Dwayne
Thank you pbreit. Maybe I can pay 30 dollars to the first person who finds a solution. And the solution can be posted online obviously.

Re : Re: Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-19 Thread Dwayne
Everything is explained here :) https://groups.google.com/d/topic/web2py/QZ11R6eYQdM/discussion

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-19 Thread Massimo Di Pierro
OK try this: def invitation(): form = SQLFORM.factory(Field('email',requires=IS_EMAIL())) if form.accepts(request): db.invitation.insert(token = form.vars.email) MESSAGE = 'click %s to register' url = URL('user/register',host=request.env.http_host)

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-04 Thread Dwayne Blind
Can somebody please help me ? I would really want this to work. I customized db.auth_user, as described in the book, to add a 'token' field. I just added : Field('token', writable=False, readable=False, default=''). Then, in the controllers, I modified default.py : def user():

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-04 Thread pbreit
I should be able to take a look later today. Been out of town.

Re : Re: Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-02 Thread Dwayne Blind
Thanks. But now the logout, login and register links no longer work. Traceback (most recent call last): File gluon/restricted.py, line 181, in restricted File

Re : Re: Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-02 Thread Dwayne Blind
If I put auth() instead of form, everybody can register again. Dwayne

Re : Re: Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-02 Thread Dwayne Blind
If I put auth() instead of form, everybody can register again. Dwayne And this is not what I want :( Can somebody help me ? Dwayne

Re: Re : Re: [web2py] Re: Email invitation

2011-06-01 Thread Anthony
On Tuesday, May 31, 2011 8:31:25 PM UTC-7, encompass wrote: Or interestID. It's still in alpha, but it does invites too. :D It's A conference management tool for the entire event life-cycle. It's a shameless plug cause it runs on Web2py. :D What's the URL?

Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-01 Thread Dwayne Blind
Yes pbreit. This is what I am trying to do. I emphasize the fact that only they can register to the entire website. I am not sure that Eventbrite can help me. I also would like to program it myself. Dwayne

Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-01 Thread pbreit
You could do an onvalidation that checks that the email address provided and/or uuid is acceptable: http://web2py.com/book/default/chapter/07#onvalidation

Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-01 Thread Dwayne Blind
Brilliant ! Thanks a lot. I followed your advice. This is what I did : def my_auth_processing(form): if db(db.invitation.token==request /examples/global/vars/request.args( 0)): return True else : return False def user(): exposes:

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-01 Thread pbreit
Oops. For registration, you use this: http://web2py.com/book/default/chapter/08?search=register_onvalidation

Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-01 Thread Dwayne Blind
Thank you. So I tried : def my_auth_processing(): if db(db.invitation.token==request /examples/global/vars/request.args( 0)): return True else : return False auth.settings.register_onvalidation = [my_auth_processing] But it does not work. Does my_auth_processing need

Re: Re : Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-01 Thread pbreit
This is going to be a bit trickier that I thought. I think the link in the email needs to deliver the uuid/token to a custom registration form. This hack might work. In your user() function in default.py, add this line: if request.args(0): form.vars.token = request.args(0) Then the

Re : Re: [web2py] Re: Email invitation

2011-05-31 Thread Dwayne Blind
Thank you Jonathan. I added the argument host='127.0.0.1:8000' to the URL. I thank user570039 ( http://stackoverflow.com/questions/6087855/django-vs-pylons-vs-web2py-registration-invitation-events ). Here is the final code, corrected from two typos (uuid instead of token) : # coding: utf8

Re: Re : Re: [web2py] Re: Email invitation

2011-05-31 Thread Jonathan Lundell
On May 31, 2011, at 11:46 AM, Dwayne Blind wrote: Thank you Jonathan. I added the argument host='127.0.0.1:8000' to the URL. There's a separate port argument that you might want to use, rather than including the port in the host. (Though in this case it doesn't make any difference, I think.)

Re: Re : Re: [web2py] Re: Email invitation

2011-05-31 Thread Dwayne Blind
On 31 mai, 20:56, Jonathan Lundell jlund...@pobox.com wrote: On May 31, 2011, at 11:46 AM, Dwayne Blind wrote: Thank you Jonathan. I added the argument host='127.0.0.1:8000' to the URL. There's a separate port argument that you might want to use, rather than including the port in the host.

Re: Re : Re: [web2py] Re: Email invitation

2011-05-31 Thread Dwayne Blind
At the beginning, I was thinking of granting some permissions to the registration page. Isn't that possible ? Thanks for your help, Dwayne On 1 juin, 00:43, Dwayne Blind dwaynebl...@gmail.com wrote: On 31 mai, 20:56, Jonathan Lundell jlund...@pobox.com wrote: On May 31, 2011, at 11:46 AM,

Re: Re : Re: [web2py] Re: Email invitation

2011-05-31 Thread pbreit
Maybe we should take a step back and try to understand what you are doing? You want to send out emails to some list of people? And include in that email a link which brings them back to your web site where they, and only they, can register for something? If you are trying to learn how to

Re: Re : Re: [web2py] Re: Email invitation

2011-05-31 Thread Jason Brower
On 06/01/2011 04:51 AM, pbreit wrote: Maybe we should take a step back and try to understand what you are doing? You want to send out emails to some list of people? And include in that email a link which brings them back to your web site where they, and only they, can register for something?