Ticket #6300: apps_namespace_patch.diff

File apps_namespace_patch.diff, 1.1 KB (added by Marinho Brandão, 17 years ago)
  • django/conf/__init__.py

     
    99import os
    1010import time     # Needed for Windows
    1111from django.conf import global_settings
     12from django import apps
    1213
    1314ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
    1415
     
    110111                new_installed_apps.append(app)
    111112        self.INSTALLED_APPS = new_installed_apps
    112113
     114        # Appends applications to django.apps applications package
     115        for app in self.INSTALLED_APPS:
     116            short_name = app.split('.')[-1]
     117            setattr(apps, short_name, __import__(app))
     118
    113119        if hasattr(time, 'tzset'):
    114120            # Move the time zone info into os.environ. See ticket #2315 for why
    115121            # we don't do this unconditionally (breaks Windows).
  • django/apps/__init__.py

     
     1"""Applications repository"""
Back to Top