Uhm, if I understood your question correctly you just want to provide a
registration form, correct?
In that case you might want to try tgapp-registration (
https://pypi.python.org/pypi/tgapp-registration ) which provides
registration out of the box for you.

In case that's not what you need, it should be fairly easy to just provide
a "createaccount_handler" method to your RootController and make a form
that submits there.
You just need to set the "action" of your form to /createaccount_handler
and it will receive all the form data. Then you can create the user like
any other model model.User(user_name="foo", email_address="[email protected]")
and just log it in with
http://turbogears.readthedocs.org/en/latest/reference/classes.html#tg.controllers.util.auth_force_login



On Wed, Dec 30, 2015 at 7:52 AM, <[email protected]> wrote:

> But I think I have it figured out now... If I should not edit the
> fastform.py file then perhaps I should just add a file to the model
> directory in the tg2 base folder. Called createuser.py...
>
>
> On Wednesday, 30 December 2015 16:08:58 UTC+11, [email protected] wrote:
>>
>> Hi, First thanks for your reply. I am trying to make a web form where a
>> user can create a new user account. And so I noticed that the default login
>> form is redirected to the fastform.py file by a /login_handler. So i though
>> that if I wanted to create a ‘createaccount_handler’ then I would need to
>> edit this fastform.py file..?
>>
>> Thanks.
>>
>> On Monday, 28 December 2015 03:03:29 UTC+11, Alessandro Molina wrote:
>>>
>>> Uh, no the fastform.py is something internal and you should not need to
>>> change it. It's not clear to me what you are trying to achieve, can you
>>> provide more details?
>>>
>>> Il giorno sab 26 dic 2015 21:59  <[email protected]> ha scritto:
>>>
>>>> Hey guys I am trying to make a create new user account page, and I have
>>>> made the form, but now to connect it to the database am I supposed to edit
>>>> the fastform.py file?
>>>>
>>>> Thanks
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "TurboGears" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at https://groups.google.com/group/turbogears.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/turbogears.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to