Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
updating 'processors' argument on AuthUser model
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoiko committed Jun 2, 2015
1 parent fbf1d89 commit 7512a16
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions nefertari/authentication/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,17 @@ class AuthUser(AuthModelDefaultMixin, engine.BaseDocument):
__tablename__ = 'nefertari_authuser'

id = engine.IdField(primary_key=True)

username = engine.StringField(
min_length=1, max_length=50, unique=True,
required=True, processors=[lower_strip])
min_length=1, max_length=50, unique=True, required=True,
before_validation=[lower_strip])
email = engine.StringField(
unique=True, required=True, processors=[lower_strip])
unique=True, required=True,
before_validation=[lower_strip])
password = engine.StringField(
min_length=3, required=True, processors=[encrypt_password])
min_length=3, required=True,
after_validation=[encrypt_password])

groups = engine.ListField(
item_type=engine.StringField,
choices=['admin', 'user'], default=['user'])
Expand Down

0 comments on commit 7512a16

Please sign in to comment.