diff --git a/readthedocs/projects/migrations/0010_migrate_domain_data.py b/readthedocs/projects/migrations/0010_migrate_domain_data.py index a4dd2e2bc47..ef60b2a00d1 100644 --- a/readthedocs/projects/migrations/0010_migrate_domain_data.py +++ b/readthedocs/projects/migrations/0010_migrate_domain_data.py @@ -4,7 +4,7 @@ from django.db import models, migrations from future.backports.urllib.parse import urlparse -import readthedocs.core.validators +import readthedocs.projects.validators def migrate_url(apps, schema_editor): @@ -46,7 +46,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='domain', name='domain', - field=models.CharField(unique=True, max_length=255, verbose_name='Domain', validators=[readthedocs.core.validators.DomainNameValidator()]), + field=models.CharField(unique=True, max_length=255, verbose_name='Domain', validators=[readthedocs.projects.validators.DomainNameValidator()]), ), ] diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 4e6157a3a17..d67000022a3 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -22,13 +22,13 @@ from readthedocs.builds.constants import LATEST, LATEST_VERBOSE_NAME, STABLE from readthedocs.core.resolver import resolve, resolve_domain from readthedocs.core.utils import broadcast, slugify -from readthedocs.core.validators import validate_domain_name, validate_repository_url from readthedocs.projects import constants from readthedocs.projects.exceptions import ProjectConfigurationError from readthedocs.projects.querysets import ( ChildRelatedProjectQuerySet, FeatureQuerySet, ProjectQuerySet, RelatedProjectQuerySet) from readthedocs.projects.templatetags.projects_tags import sort_version_aware +from readthedocs.projects.validators import validate_domain_name, validate_repository_url from readthedocs.projects.version_handling import ( determine_stable_version, version_windows) from readthedocs.restapi.client import api diff --git a/readthedocs/core/validators.py b/readthedocs/projects/validators.py similarity index 99% rename from readthedocs/core/validators.py rename to readthedocs/projects/validators.py index 8ac10849d9c..976d9e55e84 100644 --- a/readthedocs/core/validators.py +++ b/readthedocs/projects/validators.py @@ -1,4 +1,4 @@ -"""Validators for core app.""" +"""Validators for projects app.""" # From https://github.com/django/django/pull/3477/files from __future__ import absolute_import diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py index cde60e337de..69a28823a1b 100644 --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -14,8 +14,8 @@ from git.exc import BadName from six import PY2, StringIO -from readthedocs.core.validators import validate_submodule_url from readthedocs.projects.exceptions import RepositoryError +from readthedocs.projects.validators import validate_submodule_url from readthedocs.vcs_support.base import BaseVCS, VCSVersion from builtins import str