diff --git a/udata/forms/fields.py b/udata/forms/fields.py index a45bb802c..472b25364 100644 --- a/udata/forms/fields.py +++ b/udata/forms/fields.py @@ -6,8 +6,8 @@ from flask_storage.mongo import ImageReference from speaklater import is_lazy_string from wtforms import Field as WTField -from wtforms import Form as WTForm # noqa -from wtforms import fields, validators +from wtforms import Form as WTForm +from wtforms import SubmitField, fields, validators # noqa from wtforms.utils import unset_value from wtforms.widgets import TextInput from wtforms_json import flatten_json diff --git a/udata/models/__init__.py b/udata/models/__init__.py index 8b4777386..6518713f0 100644 --- a/udata/models/__init__.py +++ b/udata/models/__init__.py @@ -1,33 +1,35 @@ -from mongoengine.errors import ValidationError +from mongoengine.errors import ValidationError # noqa -import udata.linkchecker.models # noqa -from udata import entrypoints -from udata.core.activity.models import * # noqa +from udata import entrypoints # noqa +from udata.mongo import * # noqa + +# Load all core models and mixins +from udata.core.spatial.models import * # noqa +from udata.core.metrics.models import * # noqa from udata.core.badges.models import * # noqa -from udata.core.contact_point.models import * # noqa -from udata.core.dataset.models import * # noqa from udata.core.discussions.models import * # noqa from udata.core.followers.models import * # noqa -from udata.core.jobs.models import * # noqa -from udata.core.metrics.models import * # noqa +from udata.core.user.models import * # noqa from udata.core.organization.models import * # noqa -from udata.core.post.models import * # noqa -from udata.core.reports.models import * # noqa -from udata.core.reuse.models import * # noqa +from udata.core.contact_point.models import * # noqa from udata.core.site.models import * # noqa +from udata.core.dataset.models import * # noqa +from udata.core.reuse.models import * # noqa +from udata.core.activity.models import * # noqa +from udata.core.topic.models import * # noqa +from udata.core.post.models import * # noqa +from udata.core.jobs.models import * # noqa +from udata.core.tags.models import * # noqa from udata.core.spam.models import * # noqa +from udata.core.reports.models import * # noqa -# Load all core models and mixins -from udata.core.spatial.models import * # noqa -from udata.core.tags.models import * # noqa -from udata.core.topic.models import * # noqa -from udata.core.user.models import * # noqa -from udata.features.territories.models import * # noqa from udata.features.transfer.models import * # noqa +from udata.features.territories.models import * # noqa # Load HarvestSource model as harvest for catalog from udata.harvest.models import HarvestSource as Harvest # noqa -from udata.mongo import * + +import udata.linkchecker.models # noqa def init_app(app):