[web2py] Re: Using form.custom and auth
I tried testing to see if using {{=form}} and just using the venilla form produced by auth would work. It seems that auth is just not inserting new users into the db no matter what I do...whether I just use {{=form}} or I customize my own... How do I check where auth is getting stuck? On May 4, 6:26 am, waTR wrote: > Can someone point me to some examples of usage of form.custom.widget > for auth? I am looking for example code. > > On May 3, 5:59 pm, waTR wrote: > > > Solved previous problem. However, the form won't actually insert into > > the database...am I missing something? > > > On May 3, 5:36 pm, waTR wrote: > > > > Strange behaviour in view: > > > > I can't seem to use password_two using custom form. It doesn't show up > > > as a text-box. It simply shows up as the word "None". > > > > On May 3, 5:20 pm, waTR wrote: > > > > > Correction: > > > > Instead of register["_class"] = "bla", do: > > > > register.element(_name='fieldNAME')['_class'] = "custom_css_classes" > > > > > On May 3, 5:18 pm, waTR wrote: > > > > > > The way to do it is to do the following in the controller: > > > > > > register = auth.register() > > > > > login = auth.login() > > > > > > Then, you can use: > > > > > register["_class"] = "custome_css_classes" > > > > > > and same for login. Then I simply pass a "return > > > > > dict(register=register, login=login)", and I have two forms available > > > > > for me to use "{{=register.custom.widget.bla}}" with in view. > > > > > > On May 3, 5:07 pm, waTR wrote: > > > > > > > Is there any way to use form.custom.widget with AUTH.register() and > > > > > > AUTH.login() ? > > > > > > > I have a design I am trying to plug my code into, and wanted to try > > > > > > not re-writing the login/register stuff this time.
[web2py] Re: Using form.custom and auth
Can someone point me to some examples of usage of form.custom.widget for auth? I am looking for example code. On May 3, 5:59 pm, waTR wrote: > Solved previous problem. However, the form won't actually insert into > the database...am I missing something? > > On May 3, 5:36 pm, waTR wrote: > > > > > Strange behaviour in view: > > > I can't seem to use password_two using custom form. It doesn't show up > > as a text-box. It simply shows up as the word "None". > > > On May 3, 5:20 pm, waTR wrote: > > > > Correction: > > > Instead of register["_class"] = "bla", do: > > > register.element(_name='fieldNAME')['_class'] = "custom_css_classes" > > > > On May 3, 5:18 pm, waTR wrote: > > > > > The way to do it is to do the following in the controller: > > > > > register = auth.register() > > > > login = auth.login() > > > > > Then, you can use: > > > > register["_class"] = "custome_css_classes" > > > > > and same for login. Then I simply pass a "return > > > > dict(register=register, login=login)", and I have two forms available > > > > for me to use "{{=register.custom.widget.bla}}" with in view. > > > > > On May 3, 5:07 pm, waTR wrote: > > > > > > Is there any way to use form.custom.widget with AUTH.register() and > > > > > AUTH.login() ? > > > > > > I have a design I am trying to plug my code into, and wanted to try > > > > > not re-writing the login/register stuff this time.
[web2py] Re: Using form.custom and auth
Solved previous problem. However, the form won't actually insert into the database...am I missing something? On May 3, 5:36 pm, waTR wrote: > Strange behaviour in view: > > I can't seem to use password_two using custom form. It doesn't show up > as a text-box. It simply shows up as the word "None". > > On May 3, 5:20 pm, waTR wrote: > > > > > Correction: > > Instead of register["_class"] = "bla", do: > > register.element(_name='fieldNAME')['_class'] = "custom_css_classes" > > > On May 3, 5:18 pm, waTR wrote: > > > > The way to do it is to do the following in the controller: > > > > register = auth.register() > > > login = auth.login() > > > > Then, you can use: > > > register["_class"] = "custome_css_classes" > > > > and same for login. Then I simply pass a "return > > > dict(register=register, login=login)", and I have two forms available > > > for me to use "{{=register.custom.widget.bla}}" with in view. > > > > On May 3, 5:07 pm, waTR wrote: > > > > > Is there any way to use form.custom.widget with AUTH.register() and > > > > AUTH.login() ? > > > > > I have a design I am trying to plug my code into, and wanted to try > > > > not re-writing the login/register stuff this time.
[web2py] Re: Using form.custom and auth
You are right form.custom.widget.password_two is undefined. You must use On May 3, 7:36 pm, waTR wrote: > Strange behaviour in view: > > I can't seem to use password_two using custom form. It doesn't show up > as a text-box. It simply shows up as the word "None". > > On May 3, 5:20 pm, waTR wrote: > > > Correction: > > Instead of register["_class"] = "bla", do: > > register.element(_name='fieldNAME')['_class'] = "custom_css_classes" > > > On May 3, 5:18 pm, waTR wrote: > > > > The way to do it is to do the following in the controller: > > > > register = auth.register() > > > login = auth.login() > > > > Then, you can use: > > > register["_class"] = "custome_css_classes" > > > > and same for login. Then I simply pass a "return > > > dict(register=register, login=login)", and I have two forms available > > > for me to use "{{=register.custom.widget.bla}}" with in view. > > > > On May 3, 5:07 pm, waTR wrote: > > > > > Is there any way to use form.custom.widget with AUTH.register() and > > > > AUTH.login() ? > > > > > I have a design I am trying to plug my code into, and wanted to try > > > > not re-writing the login/register stuff this time.
[web2py] Re: Using form.custom and auth
Strange behaviour in view: I can't seem to use password_two using custom form. It doesn't show up as a text-box. It simply shows up as the word "None". On May 3, 5:20 pm, waTR wrote: > Correction: > Instead of register["_class"] = "bla", do: > register.element(_name='fieldNAME')['_class'] = "custom_css_classes" > > On May 3, 5:18 pm, waTR wrote: > > > > > The way to do it is to do the following in the controller: > > > register = auth.register() > > login = auth.login() > > > Then, you can use: > > register["_class"] = "custome_css_classes" > > > and same for login. Then I simply pass a "return > > dict(register=register, login=login)", and I have two forms available > > for me to use "{{=register.custom.widget.bla}}" with in view. > > > On May 3, 5:07 pm, waTR wrote: > > > > Is there any way to use form.custom.widget with AUTH.register() and > > > AUTH.login() ? > > > > I have a design I am trying to plug my code into, and wanted to try > > > not re-writing the login/register stuff this time.
[web2py] Re: Using form.custom and auth
Correction: Instead of register["_class"] = "bla", do: register.element(_name='fieldNAME')['_class'] = "custom_css_classes" On May 3, 5:18 pm, waTR wrote: > The way to do it is to do the following in the controller: > > register = auth.register() > login = auth.login() > > Then, you can use: > register["_class"] = "custome_css_classes" > > and same for login. Then I simply pass a "return > dict(register=register, login=login)", and I have two forms available > for me to use "{{=register.custom.widget.bla}}" with in view. > > On May 3, 5:07 pm, waTR wrote: > > > > > Is there any way to use form.custom.widget with AUTH.register() and > > AUTH.login() ? > > > I have a design I am trying to plug my code into, and wanted to try > > not re-writing the login/register stuff this time.
[web2py] Re: Using form.custom and auth
The way to do it is to do the following in the controller: register = auth.register() login = auth.login() Then, you can use: register["_class"] = "custome_css_classes" and same for login. Then I simply pass a "return dict(register=register, login=login)", and I have two forms available for me to use "{{=register.custom.widget.bla}}" with in view. On May 3, 5:07 pm, waTR wrote: > Is there any way to use form.custom.widget with AUTH.register() and > AUTH.login() ? > > I have a design I am trying to plug my code into, and wanted to try > not re-writing the login/register stuff this time.