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 : 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 : 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 : 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 : 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

[web2py] Re : Re: Email invitation

2011-05-31 Thread Dwayne Blind
Thank you very much Massimo. The import uuid had to be added inside the invitation function, not outside. Thanks a lot to all three of you.

[web2py] Most basic use of Views

2011-05-31 Thread Dwayne Blind
Dear all, Here is the content of the view myproject/views/invitation/invitation.html : {{extend 'layout.html'}} h1{{=message}}/h1 {{=T /examples/global/vars/T('Enter an email address :')}} {{=form}} {{=BEAUTIFY /examples/global/vars/BEAUTIFY(response/examples/global/vars/response ._vars)}}

[web2py] Re: Most basic use of Views

2011-05-31 Thread Dwayne Blind
, 4:23 am, Dwayne Blind dwaynebl...@gmail.com wrote: Dear all, Here is the content of the view myproject/views/invitation/invitation.html : {{extend 'layout.html'}} h1{{=message}}/h1 {{=T /examples/global/vars/T('Enter an email address :')}} {{=form}} {{=BEAUTIFY /examples

[web2py] Re: Most basic use of Views

2011-05-31 Thread Dwayne Blind
Thank you pbreit. I have already gone through chapter 3. It convinced me to try web2py. I also ordered the web2py book on Amazon. Dwayne On 31 mai, 17:14, pbreit pbreitenb...@gmail.com wrote: The Book's search function works pretty well for most search

[web2py] Re: Most basic use of Views

2011-05-31 Thread Dwayne Blind
You are right. Dwayne On 31 mai, 17:29, pbreit pbreitenb...@gmail.com wrote: I'm sure the paper version of the book is good but it's beneficial to become proficient at searching the online book.

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 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

[web2py] Re: Default user.html

2011-05-30 Thread Dwayne Blind
Thank you very much. Dwayne On 30 mai, 02:18, Massimo Di Pierro massimo.dipie...@gmail.com wrote: You can disable actions if you use third party authentication. On May 29, 6:19 pm, Dwayne Blind dwaynebl...@gmail.com wrote: Hi, The following lines are usual : div id=web2py_user_form

[web2py] Email invitation

2011-05-30 Thread Dwayne Blind
Dear all, I am trying to implement an email invitation system. # coding: utf8 def invitation(): form = FORM(INPUT(_name='email', requires=IS_NOT_EMPTY()), INPUT(_type='submit')) if form.accepts(request.vars): uuid=str(uuid.uuid4())

[web2py] Re: Email invitation

2011-05-30 Thread Dwayne Blind
Thanks for your help. This is the error message I get : Internal error Ticket issued: myproject/127.0.0.1.2011-05-30.20-27-41.46efa4bd- a623-4bb9-8a5d-3579d3693c8e Here is the traceback : Traceback (most recent call last): File gluon/restricted.py, line 181, in restricted File

[web2py] Re: Email invitation

2011-05-30 Thread Dwayne Blind
There are 15 lines in invitation.py. And line 9 is : uuid=str(uuid.uuid4()). Thanks On 30 mai, 20:48, pbreit pbreitenb...@gmail.com wrote: Or line 9, rather.

[web2py] Re: Email invitation

2011-05-30 Thread Dwayne Blind
Nope I don't have import uuid :( Should I ? Where can I read more about uuid ? Thank you On 30 mai, 21:15, pbreit pbreitenb...@gmail.com wrote: Did you get that error before? Do you have import uuid in the file?

[web2py] Re: Email invitation

2011-05-30 Thread Dwayne Blind
clue ? Sorry I am just a beginner... I have read the UUID Wikipedia page. On 30 mai, 21:42, Dwayne Blind dwaynebl...@gmail.com wrote: Nope I don't have import uuid :( Should I ? Where can I read more about uuid ? Thank you On 30 mai, 21:15, pbreit pbreitenb...@gmail.com wrote: Did

[web2py] Re: Email invitation

2011-05-30 Thread Dwayne Blind
1. # coding: utf8 2. import uuid 3. 4. def invitation(): 5. 6. form = FORM(INPUT(_name='email', requires=IS_NOT_EMPTY()), 7. INPUT(_type='submit')) 8. 9. if form.accepts(request.vars): 10. uuid=str(uuid.uuid4()) 11. db.invitation.insert(token = uuid) 12.

[web2py] Default user.html

2011-05-29 Thread Dwayne Blind
Hi, The following lines are usual : div id=web2py_user_form {{=form}} {{if request.args(0)=='login':}} {{if not 'register' in auth.settings.actions_disabled:}} # CONDITION N°1 br/a href={{=URL(r=request,args='register')}}register/a {{pass}} {{if not 'request_reset_password' in