What about posting them on web2pyslices.com or the wiki then linking
at the end of the thread?  Google groups is a bad place to post code
as it messes the formatting and is unsearchable after a couple of
months unless you use a third party site like gmane.

On Oct 13, 8:26 pm, Alex Fanjul <[email protected]> wrote:
> It would be useful if we could add [SNIPPET] to the end of a email (in
> thread) to indicate that its a future useful source code.... (as we are
> doing with [SOLVED] problems already).
> In this way, we could search/parse/filter for interesting snippets like
> this one from Thadeus... (by now, I used to classificate them as  
> favourites)
>
> What do u think?
> Alex F
>
> El 12/10/2009 19:27, Thadeus Burgess escribió:
>
>
>
> > Hash something unique.
>
> > I have implemented a custom verification in the system I am working on
> > at work.
>
> > In my signup action, this creates a super super unique key 32 length
> > string :) (this is overkill, but handles if two forms happen at the
> > same request.now)
>
> > signup_hash = hash("%s|%s|%s|%s|%s" % (member_id, first_name,
> > last_name, email, request.now))
>
> > 127.0.0.1:8000/init/default/confirm/%s
> > <http://127.0.0.1:8000/init/default/confirm/%s> % signup_hash
>
> > def confirm():
> >     response.title = 'Confirmation'
> >     hash = request.args(0) or None
>
> >     success = False
> >     member = None
>
> >     if hash:
> >         member = db(db.participant.signup_hash == hash).select().first()
>
> >         if member:
> >             member['is_valid'] = True
> >             db.participant[member.id <http://member.id>] = member
> >             success = True
>
> >     return dict(success=success, hash=hash, member=member)
>
> > and on your confirmation page, you know
>
> > {if hash:}}
> >     {{if success:}} you have been confirmed
> >     {{else:}} sorry could not find your account for some reason.
> >     {{pass}}
>
> > {{else:}}
> > thank you for registering, you should be recieving an email shortly
> > {{pass}}
>
> > -Thadeus
>
> > On Mon, Oct 12, 2009 at 11:43 AM, mattynoce <[email protected]
> > <mailto:[email protected]>> wrote:
>
> >     hi, i'm looking to email verification separate from the auth_user
> >     class. i know the concept but what i'd like to do is use the same
> >     function that auth uses to create its random string. is there a simple
> >     function i can call to return a long, quasi-random string?
>
> >     for example, i want to do something like:
> >     str = [get long string]
> >     message = 'Please click here:
> >    http://www.mysite.com/init/default/customverify/'
> >     + str
>
> >     is that function available?
>
> >     thank,
>
> >     matt
>
> --
> Alejandro Fanjul Fdez.
> [email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to