Skip to content

Commit

Permalink
Moved apps back in the toplevel django namespace.
Browse files Browse the repository at this point in the history
Reverted 4a56a93.
  • Loading branch information
aaugustin committed Dec 22, 2013
1 parent 99bd39e commit 2fef9e5
Show file tree
Hide file tree
Showing 95 changed files with 101 additions and 101 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion django/contrib/admin/sites.py
Expand Up @@ -6,7 +6,7 @@
from django.contrib.contenttypes import views as contenttype_views
from django.views.decorators.csrf import csrf_protect
from django.db.models.base import ModelBase
from django.core.apps import app_cache
from django.apps import app_cache
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.core.urlresolvers import reverse, NoReverseMatch
from django.template.response import TemplateResponse
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/admin/templatetags/admin_static.py
@@ -1,4 +1,4 @@
from django.core.apps import app_cache
from django.apps import app_cache
from django.template import Library

register = Library()
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/admin/validation.py
@@ -1,4 +1,4 @@
from django.core.apps import app_cache
from django.apps import app_cache
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db.models.fields import FieldDoesNotExist
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/admindocs/views.py
Expand Up @@ -5,10 +5,10 @@
import warnings

from django import template
from django.apps import app_cache
from django.conf import settings
from django.contrib import admin
from django.contrib.admin.views.decorators import staff_member_required
from django.core.apps import app_cache
from django.db import models
from django.core.exceptions import ViewDoesNotExist
from django.http import Http404
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/auth/__init__.py
Expand Up @@ -123,7 +123,7 @@ def get_user_model():
"""
Returns the User model that is active in this project.
"""
from django.core.apps import app_cache
from django.apps import app_cache

try:
app_label, model_name = settings.AUTH_USER_MODEL.split('.')
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/auth/management/__init__.py
Expand Up @@ -6,9 +6,9 @@
import getpass
import unicodedata

from django.apps import app_cache, UnavailableApp
from django.contrib.auth import (models as auth_app, get_permission_codename,
get_user_model)
from django.core.apps import app_cache, UnavailableApp
from django.core import exceptions
from django.core.management.base import CommandError
from django.db import DEFAULT_DB_ALIAS, router
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/auth/tests/test_management.py
@@ -1,14 +1,14 @@
from __future__ import unicode_literals
from datetime import date

from django.apps import app_cache
from django.contrib.auth import models, management
from django.contrib.auth.management import create_permissions
from django.contrib.auth.management.commands import changepassword
from django.contrib.auth.models import User
from django.contrib.auth.tests.custom_user import CustomUser
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.contrib.contenttypes.models import ContentType
from django.core.apps import app_cache
from django.core import exceptions
from django.core.management import call_command
from django.core.management.base import CommandError
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/comments/__init__.py
@@ -1,8 +1,8 @@
from importlib import import_module
import warnings
from django.apps import app_cache
from django.conf import settings
from django.core import urlresolvers
from django.core.apps import app_cache
from django.core.exceptions import ImproperlyConfigured
from django.contrib.comments.models import Comment
from django.contrib.comments.forms import CommentForm
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/comments/views/comments.py
@@ -1,9 +1,9 @@
from django import http
from django.apps import app_cache
from django.conf import settings
from django.contrib import comments
from django.contrib.comments import signals
from django.contrib.comments.views.utils import next_redirect, confirmation_view
from django.core.apps import app_cache
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db import models
from django.shortcuts import render_to_response
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/contenttypes/management.py
@@ -1,5 +1,5 @@
from django.apps import app_cache, UnavailableApp
from django.contrib.contenttypes.models import ContentType
from django.core.apps import app_cache, UnavailableApp
from django.db import DEFAULT_DB_ALIAS, router
from django.db.models import signals
from django.utils.encoding import smart_text
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/contenttypes/models.py
@@ -1,4 +1,4 @@
from django.core.apps import app_cache
from django.apps import app_cache
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_text, force_text
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/contenttypes/tests.py
@@ -1,9 +1,9 @@
from __future__ import unicode_literals

from django.apps import app_cache
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.views import shortcut
from django.contrib.sites.models import get_current_site
from django.core.apps import app_cache
from django.db import models
from django.http import HttpRequest, Http404
from django.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/gis/sitemaps/kml.py
@@ -1,4 +1,4 @@
from django.core.apps import app_cache
from django.apps import app_cache
from django.core import urlresolvers
from django.contrib.sitemaps import Sitemap
from django.contrib.gis.db.models.fields import GeometryField
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/gis/sitemaps/views.py
Expand Up @@ -2,7 +2,7 @@

import warnings

from django.core.apps import app_cache
from django.apps import app_cache
from django.http import HttpResponse, Http404
from django.template import loader
from django.contrib.sites.models import get_current_site
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/gis/tests/geoapp/test_feeds.py
Expand Up @@ -3,11 +3,11 @@
from unittest import skipUnless
from xml.dom import minidom

from django.apps import app_cache
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
from django.core.apps import app_cache
from django.test import TestCase

if HAS_GEOS:
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/gis/tests/geoapp/test_sitemaps.py
Expand Up @@ -6,11 +6,11 @@
import os
import zipfile

from django.apps import app_cache
from django.conf import settings
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
from django.contrib.sites.models import Site
from django.core.apps import app_cache
from django.test import TestCase
from django.test.utils import IgnoreDeprecationWarningsMixin
from django.utils._os import upath
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/messages/tests/base.py
@@ -1,13 +1,13 @@
from unittest import skipUnless

from django import http
from django.apps import app_cache
from django.conf import settings, global_settings
from django.contrib.messages import constants, utils, get_level, set_level
from django.contrib.messages.api import MessageFailure
from django.contrib.messages.constants import DEFAULT_LEVELS
from django.contrib.messages.storage import default_storage, base
from django.contrib.messages.storage.base import Message
from django.core.apps import app_cache
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
from django.utils.translation import ugettext_lazy
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/redirects/middleware.py
@@ -1,9 +1,9 @@
from __future__ import unicode_literals

from django.apps import app_cache
from django.conf import settings
from django.contrib.redirects.models import Redirect
from django.contrib.sites.models import get_current_site
from django.core.apps import app_cache
from django.core.exceptions import ImproperlyConfigured
from django import http

Expand Down
2 changes: 1 addition & 1 deletion django/contrib/redirects/tests.py
@@ -1,7 +1,7 @@
from django import http
from django.apps import app_cache
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.apps import app_cache
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
from django.test.utils import override_settings
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/sitemaps/tests/test_flatpages.py
Expand Up @@ -2,8 +2,8 @@

from unittest import skipUnless

from django.apps import app_cache
from django.conf import settings
from django.core.apps import app_cache

from .base import SitemapTestsBase

Expand Down
2 changes: 1 addition & 1 deletion django/contrib/sitemaps/tests/test_http.py
Expand Up @@ -4,10 +4,10 @@
from datetime import date
from unittest import skipUnless

from django.apps import app_cache
from django.conf import settings
from django.contrib.sitemaps import Sitemap, GenericSitemap
from django.contrib.sites.models import Site
from django.core.apps import app_cache
from django.core.exceptions import ImproperlyConfigured
from django.test.utils import override_settings
from django.utils.formats import localize
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/sites/tests.py
@@ -1,8 +1,8 @@
from __future__ import unicode_literals

from django.apps import app_cache
from django.conf import settings
from django.contrib.sites.models import Site, RequestSite, get_current_site
from django.core.apps import app_cache
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.http import HttpRequest
from django.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/staticfiles/finders.py
@@ -1,8 +1,8 @@
from collections import OrderedDict
import os

from django.apps import app_cache
from django.conf import settings
from django.core.apps import app_cache
from django.core.exceptions import ImproperlyConfigured
from django.core.files.storage import default_storage, Storage, FileSystemStorage
from django.utils.functional import empty, LazyObject
Expand Down
2 changes: 1 addition & 1 deletion django/core/checks/compatibility/django_1_6_0.py
@@ -1,6 +1,6 @@
from __future__ import unicode_literals

from django.core.apps import app_cache
from django.apps import app_cache
from django.db import models


Expand Down
4 changes: 2 additions & 2 deletions django/core/management/__init__.py
Expand Up @@ -117,7 +117,7 @@ def get_commands():
# Populate the app cache outside of the try/except block to avoid
# catching ImproperlyConfigured errors that aren't caused by the
# absence of a settings module.
from django.core.apps import app_cache
from django.apps import app_cache
app_configs = app_cache.get_app_configs()
apps = [app_config.name for app_config in app_configs]

Expand Down Expand Up @@ -346,7 +346,7 @@ def autocomplete(self):
elif cwords[0] in ('dumpdata', 'sql', 'sqlall', 'sqlclear',
'sqlcustom', 'sqlindexes', 'sqlsequencereset', 'test'):
try:
from django.core.apps import app_cache
from django.apps import app_cache
app_configs = app_cache.get_app_configs()
# Get the last part of the dotted path as the app name.
options += [(app_config.label, 0) for app_config in app_configs]
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/base.py
Expand Up @@ -341,7 +341,7 @@ class AppCommand(BaseCommand):
args = '<appname appname ...>'

def handle(self, *app_labels, **options):
from django.core.apps import app_cache
from django.apps import app_cache
if not app_labels:
raise CommandError('Enter at least one appname.')
# Populate models and don't use only_with_models_module=True when
Expand Down
4 changes: 2 additions & 2 deletions django/core/management/commands/dumpdata.py
Expand Up @@ -37,7 +37,7 @@ class Command(BaseCommand):
args = '[appname appname.ModelName ...]'

def handle(self, *app_labels, **options):
from django.core.apps import app_cache
from django.apps import app_cache

format = options.get('format')
indent = options.get('indent')
Expand Down Expand Up @@ -162,7 +162,7 @@ def sort_dependencies(app_list):
is serialized before a normal model, and any model with a natural key
dependency has it's dependencies serialized first.
"""
from django.core.apps import app_cache
from django.apps import app_cache
# Process the list of models, and get the list of dependencies
model_dependencies = []
models = set()
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/commands/flush.py
Expand Up @@ -2,7 +2,7 @@
from importlib import import_module
from optparse import make_option

from django.core.apps import app_cache
from django.apps import app_cache
from django.db import connections, router, transaction, DEFAULT_DB_ALIAS
from django.core.management import call_command
from django.core.management.base import NoArgsCommand, CommandError
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/commands/loaddata.py
Expand Up @@ -7,8 +7,8 @@
import zipfile
from optparse import make_option

from django.apps import app_cache
from django.conf import settings
from django.core.apps import app_cache
from django.core import serializers
from django.core.management.base import BaseCommand, CommandError
from django.core.management.color import no_style
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/commands/makemigrations.py
Expand Up @@ -3,7 +3,7 @@
import operator
from optparse import make_option

from django.core.apps import app_cache
from django.apps import app_cache
from django.core.management.base import BaseCommand, CommandError
from django.db import connections, DEFAULT_DB_ALIAS, migrations
from django.db.migrations.loader import MigrationLoader
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/commands/migrate.py
Expand Up @@ -6,7 +6,7 @@
import itertools
import traceback

from django.core.apps import app_cache
from django.apps import app_cache
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
from django.core.management.color import no_style
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/commands/shell.py
Expand Up @@ -66,7 +66,7 @@ def run_shell(self, shell=None):
def handle_noargs(self, **options):
# XXX: (Temporary) workaround for ticket #1796: force early loading of all
# models from installed apps.
from django.core.apps import app_cache
from django.apps import app_cache
app_cache.get_models()

use_plain = options.get('plain', False)
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/commands/sqlsequencereset.py
Expand Up @@ -2,7 +2,7 @@

from optparse import make_option

from django.core.apps import app_cache
from django.apps import app_cache
from django.core.management.base import AppCommand
from django.db import connections, DEFAULT_DB_ALIAS

Expand Down
2 changes: 1 addition & 1 deletion django/core/management/sql.py
Expand Up @@ -5,8 +5,8 @@
import re
import warnings

from django.apps import app_cache
from django.conf import settings
from django.core.apps import app_cache
from django.core.management.base import CommandError
from django.db import models, router

Expand Down
2 changes: 1 addition & 1 deletion django/core/management/validation.py
Expand Up @@ -26,7 +26,7 @@ def get_validation_errors(outfile, app=None):
validates all models of all installed apps. Writes errors, if any, to outfile.
Returns number of errors.
"""
from django.core.apps import app_cache
from django.apps import app_cache
from django.db import connection, models
from django.db.models.deletion import SET_NULL, SET_DEFAULT

Expand Down
2 changes: 1 addition & 1 deletion django/core/serializers/base.py
Expand Up @@ -3,7 +3,7 @@
"""
import warnings

from django.core.apps import app_cache
from django.apps import app_cache
from django.db import models
from django.utils import six

Expand Down
2 changes: 1 addition & 1 deletion django/core/serializers/python.py
Expand Up @@ -5,8 +5,8 @@
"""
from __future__ import unicode_literals

from django.apps import app_cache
from django.conf import settings
from django.core.apps import app_cache
from django.core.serializers import base
from django.db import models, DEFAULT_DB_ALIAS
from django.utils.encoding import smart_text, is_protected_type
Expand Down
2 changes: 1 addition & 1 deletion django/core/serializers/xml_serializer.py
Expand Up @@ -4,8 +4,8 @@

from __future__ import unicode_literals

from django.apps import app_cache
from django.conf import settings
from django.core.apps import app_cache
from django.core.serializers import base
from django.db import models, DEFAULT_DB_ALIAS
from django.utils.xmlutils import SimplerXMLGenerator
Expand Down

0 comments on commit 2fef9e5

Please sign in to comment.