I applied your line to auth_user:
db.auth_user.password.requires = [IS_NOT_EMPTY(error_message='Password
needed!'),IS_STRONG(min=7, special=0, upper=0, number=0), CRYPT()]
and I cannot reproduce your problem. :-(
There is something else in the logic that is passing a non-string to
IS_STRONG()(
> I really need to see the models where you set IS_STRONG.
> Somehow the value passed to the validator is not a string so the validator
> chokes. This can be fixed in IS_STRONG.__call__ by setting value =
> str(value) but I would like to understand why it is happening.
Sure, this is the rele
I really need to see the models where you set IS_STRONG.
Somehow the value passed to the validator is not a string so the validator
chokes. This can be fixed in IS_STRONG.__call__ by setting value =
str(value) but I would like to understand why it is happening.
On Friday, 13 July 2012 11:06:29
Any further suggestion to what causes the error I'm seeing? Thanks!
> which web2py version? Do you have a custom auth_user table? Looks like
> something wrong with the list of validators for a field containing the
> IS_UPPER validator.
This is on 1.99.7 stable. I do have two extra field to the auth_user table,
and use a custom name instead of 'auth_user', bu
As was mentioned earlier, if you're going to create a custom form like
that, in place of , you need to include {{=form.custom.end}}. The
reason is that web2py forms include two hidden fields, _formname and
_formkey, and form.custom.end will add those hidden fields. They are used
to protect agai
Now I have the custom page (e.g. register) appears correctly, however, when
I submit the form nothing happens - the form just clears itself with no
error msg or anything.
My 'register' action in controller is:
def register():
return dict(form=auth.register())
My 'layout.html' is as follow
>
> Cool. But is there way to configure the tag of a specific view page
> that extends the 'layout.html'? For example, for my custom view, I want its
> body tag to be like:
>
>
>
> Is it possible to configure such thing? Thanks!
>
and in the view:
{{body_class = 'my_css_class'}}
{{extend '
> Right, you don't need a body tag in the view either. In layout.html, there
> should be an {{include}} -- that gets replaced with the entire contents
> of the view that extends the layout.
Cool. But is there way to configure the tag of a specific view page
that extends the 'layout.html'? F
The layout also include a section, does this mean that in my custom
> view I shouldn't have another section such that I should just write
> all the custom html content without tags?
>
Right, you don't need a body tag in the view either. In layout.html, there
should be an {{include}} -- tha
> No, because the layout already includes a section. The content of
> the view gets inserted in the layout.html file at the point of the
> {{include}}, which presumably is not in the head.
The layout also include a section, does this mean that in my custom
view I shouldn't have another se
>
> 1. I want to utilize 'layout.html' to some extent such that it stores some
> common css files for the rest of the view pages. Kinda like a shared base
> template, and I want to add page-specific css (or js) files on individual
> html view page. Is it as simple as including:
>
> {{extend lay
> {{=form.custom.begin}}
> #in between the opening and closing tags put in your normal html code and
> make sure the element names corresponds to the column names as defined in
> your database. web2py will handle the rest automatically. This is the most
> flexible way while still making use of
>
> When I used customform for login, it won't give me any errors to be shown
> whenever the password was invalid or email is not existing. I put it on
> jquery mobile website. Any idea?
>
Just to clarify, if you let web2py serialize the form widgets (i.e., using
{{=form}} or {{=form.custom.wid
When I used customform for login, it won't give me any errors to be shown
whenever the password was invalid or email is not existing. I put it on
jquery mobile website. Any idea?
On Jul 4, 2012 4:25 PM, "Anthony" wrote:
> If you refuse to use web2py's css and js files, remember that
>> response.f
>
> If you refuse to use web2py's css and js files, remember that
> response.flash and session.flash wont work
>
Well, the flash message won't *display*, but it's easy to add some very
minimal JS code to get it to display.
> and also your validators also wont work. so you would have to handl
Hi Chris,
I think Max just beat me in posting the solution. Thats the way I
implemented by custom forms. Have the controller send the form to the view
like
def controller():
return dict(form=form)
in your view just do
{{=form.custom.begin}}
#in between the opening and closing tags put in
Given this
>
> def register():
> return dict(form=auth.register())
>
>
you view just needs:
{{=form}}
>
> ...
>
>
>First name*
>
>Last name*
>
>Email*
>
>
>
>
>
>
> ...
>
> But you need to replace with {{=form.cus
18 matches
Mail list logo