Skip to content

Commit

Permalink
Move h.validators -> h.schemas.validators
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzadanger committed Sep 27, 2018
1 parent 8962ed9 commit ee213f0
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion h/accounts/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
import deform
from jinja2 import Markup

from h import i18n, models, validators
from h import i18n, models
from h.models.user import (
EMAIL_MAX_LENGTH,
USERNAME_MAX_LENGTH,
USERNAME_MIN_LENGTH,
USERNAME_PATTERN,
)
from h.schemas import validators
from h.schemas.base import CSRFSchema

_ = i18n.TranslationString
Expand Down
2 changes: 1 addition & 1 deletion h/groups/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import slugify

from h import i18n
from h import validators
from h.schemas import validators
from h.accounts.schemas import CSRFSchema
from h.models.group import (
GROUP_DESCRIPTION_MAX_LENGTH,
Expand Down
3 changes: 2 additions & 1 deletion h/schemas/forms/accounts/edit_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import colander
import deform

from h import i18n, validators
from h import i18n
from h.accounts import util
from h.models.user import (
DISPLAY_NAME_MAX_LENGTH,
)
from h.schemas import validators
from h.schemas.base import CSRFSchema

_ = i18n.TranslationString
Expand Down
3 changes: 2 additions & 1 deletion h/schemas/forms/accounts/forgot_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import colander
import deform

from h import i18n, models, validators
from h import i18n, models
from h.schemas import validators
from h.schemas.base import CSRFSchema

_ = i18n.TranslationString
Expand Down
2 changes: 1 addition & 1 deletion h/schemas/forms/accounts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import colander
import deform

from h import validators
from h.schemas import validators


PASSWORD_MIN_LENGTH = 2 # FIXME: this is ridiculous
Expand Down
2 changes: 1 addition & 1 deletion h/schemas/forms/admin/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from deform.widget import SelectWidget, SequenceWidget, TextAreaWidget, TextInputWidget

from h import i18n
from h import validators
from h.schemas import validators
from h.models.group import (
GROUP_NAME_MIN_LENGTH,
GROUP_NAME_MAX_LENGTH,
Expand Down
2 changes: 1 addition & 1 deletion h/schemas/forms/admin/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ORGANIZATION_NAME_MIN_CHARS,
ORGANIZATION_NAME_MAX_CHARS,
)
from h import validators
from h.schemas import validators
from h.schemas.base import CSRFSchema

_ = h.i18n.TranslationString
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import colander

from h.validators import Email
from h.schemas.validators import Email


class TestEmail(object):
Expand Down

0 comments on commit ee213f0

Please sign in to comment.