Ticket #9323: 9323_r9208.diff

File 9323_r9208.diff, 2.7 KB (added by Carl Meyer, 16 years ago)
  • TabularUnified django/conf/__init__.py

     
    113113                app_subdirs = os.listdir(appdir)
    114114                app_subdirs.sort()
    115115                for d in app_subdirs:
    116                     if d.isalpha() and os.path.isdir(os.path.join(appdir, d)):
     116                    if d.isalnum() and d[0].isalpha() and os.path.isdir(os.path.join(appdir, d)):
    117117                        new_installed_apps.append('%s.%s' % (app[:-2], d))
    118118            else:
    119119                new_installed_apps.append(app)
  • TabularUnified tests/regressiontests/app_loading/test_settings.py

     
     1INSTALLED_APPS = (
     2    'parent.*',
     3)
  • TabularUnified tests/regressiontests/app_loading/parent/app/__init__.py

     
     1# not empty to make SVN happy
  • TabularUnified tests/regressiontests/app_loading/parent/app1/__init__.py

     
     1# not empty to make SVN happy
  • TabularUnified tests/regressiontests/app_loading/parent/__init__.py

     
     1# not empty to make SVN happy
  • TabularUnified tests/regressiontests/app_loading/tests.py

     
     1"""
     2Test the globbing of INSTALLED_APPS.
     3
     4>>> import os, sys
     5>>> old_sys_path = sys.path
     6>>> sys.path.append(os.path.dirname(os.path.abspath(__file__)))
     7
     8>>> from django.conf import Settings
     9
     10>>> s = Settings('test_settings')
     11
     12>>> s.INSTALLED_APPS
     13['parent.app', 'parent.app1']
     14
     15>>> sys.path = old_sys_path
     16
     17"""
     18
Back to Top