Thanks Massimo
I never really went away ;-)
On Wednesday, October 7, 2015 at 2:06:16 PM UTC-4, Massimo Di Pierro wrote:
>
> welcome back Denes. :-)
> your fix is in trunk.
>
>
> On Monday, 5 October 2015 15:33:48 UTC-5, DenesL wrote:
>>
>> This seems to work:
>>
>> def __call__(self,
welcome back Denes. :-)
your fix is in trunk.
On Monday, 5 October 2015 15:33:48 UTC-5, DenesL wrote:
>
> This seems to work:
>
> def __call__(self, value):
> v = str(value)
> v = v and v[:self.max_length]
> if len(v) < self.min_length:
> return ('',
Tracing the execution it shows that the password is converted to a
LazyCrypt object and then validated using the field's requires which uses
Crypt.__call__ where this line
value = value and value[:self.max_length]
triggers a __getitem__ exception, since it is not defined in class
LazyCrypt.
This seems to work:
def __call__(self, value):
v = str(value)
v = v and v[:self.max_length]
if len(v) < self.min_length:
return ('', translate(self.error_message))
if isinstance(value, LazyCrypt):
return (value, None)
return
The error is gone but the login does not work.
This needs more thought.
On Monday, October 5, 2015 at 2:51:22 PM UTC-4, DenesL wrote:
>
> Tracing the execution it shows that the password is converted to a
> LazyCrypt object and then validated using the field's requires which uses
>
Hi again
alternatively, could anyone post some working code sample of using
validation with login_bare?
the examples from the book and some posts in the forum were not enough for
me.
Thanks,
Denes
On Saturday, October 3, 2015 at 7:58:52 PM UTC-4, DenesL wrote:
>
> Hello all,
>
> Trying to do
6 matches
Mail list logo