From 58becc2cf35d8e18c3816faa1f2bb67dc05ad3b6 Mon Sep 17 00:00:00 2001 From: duker Date: Fri, 22 Jun 2018 16:50:26 +0300 Subject: [PATCH] #140 Change imports to new redirects app --- generic_admin/mixins.py | 2 +- redirects/__init__.py | 2 +- redirects/admin.py | 2 +- redirects/apps.py | 2 +- redirects/middleware.py | 2 +- tests/generic_admin/test_admin_models.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generic_admin/mixins.py b/generic_admin/mixins.py index 92ba897..99c0a7f 100644 --- a/generic_admin/mixins.py +++ b/generic_admin/mixins.py @@ -1,5 +1,5 @@ from django.contrib import admin -from django.contrib.redirects.models import Redirect +from redirects.models import Redirect from django.contrib.sites.shortcuts import get_current_site from django.core.urlresolvers import reverse from django.db.models import QuerySet, F diff --git a/redirects/__init__.py b/redirects/__init__.py index 65364a4..0e414c1 100644 --- a/redirects/__init__.py +++ b/redirects/__init__.py @@ -1 +1 @@ -default_app_config = 'django.contrib.redirects.apps.RedirectsConfig' +default_app_config = 'redirects.apps.RedirectsConfig' diff --git a/redirects/admin.py b/redirects/admin.py index f828747..65df748 100644 --- a/redirects/admin.py +++ b/redirects/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from django.contrib.redirects.models import Redirect +from redirects.models import Redirect @admin.register(Redirect) diff --git a/redirects/apps.py b/redirects/apps.py index b131884..13614fd 100644 --- a/redirects/apps.py +++ b/redirects/apps.py @@ -3,5 +3,5 @@ class RedirectsConfig(AppConfig): - name = 'django.contrib.redirects' + name = 'redirects' verbose_name = _('Redirects') diff --git a/redirects/middleware.py b/redirects/middleware.py index 155b469..fe1fd05 100644 --- a/redirects/middleware.py +++ b/redirects/middleware.py @@ -1,6 +1,6 @@ from django.apps import apps from django.conf import settings -from django.contrib.redirects.models import Redirect +from redirects.models import Redirect from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseGone, HttpResponsePermanentRedirect diff --git a/tests/generic_admin/test_admin_models.py b/tests/generic_admin/test_admin_models.py index c2bcdf4..0b1d5a8 100644 --- a/tests/generic_admin/test_admin_models.py +++ b/tests/generic_admin/test_admin_models.py @@ -1,5 +1,5 @@ from django.contrib.messages.storage.fallback import FallbackStorage -from django.contrib.redirects.models import Redirect +from redirects.models import Redirect from django.test import TestCase from django.http.request import HttpRequest