Author: mtredinnick
Date: 2009-03-08 04:39:48 -0500 (Sun, 08 Mar 2009)
New Revision: 9994
Added:
django/trunk/tests/regressiontests/app_loading/
django/trunk/tests/regressiontests/app_loading/__init__.py
django/trunk/tests/regressiontests/app_loading/models.py
django/trunk/tests/regressiontests/app_loading/parent/
django/trunk/tests/regressiontests/app_loading/parent/__init__.py
django/trunk/tests/regressiontests/app_loading/parent/app/
django/trunk/tests/regressiontests/app_loading/parent/app/__init__.py
django/trunk/tests/regressiontests/app_loading/parent/app1/
django/trunk/tests/regressiontests/app_loading/parent/app1/__init__.py
django/trunk/tests/regressiontests/app_loading/test_settings.py
django/trunk/tests/regressiontests/app_loading/tests.py
Modified:
django/trunk/django/conf/__init__.py
Log:
Fixed #9323 -- Allow glob loading in INSTALLED_APPS to handle digits in names.
Patch from carljm.
Modified: django/trunk/django/conf/__init__.py
===================================================================
--- django/trunk/django/conf/__init__.py 2009-03-08 09:33:14 UTC (rev
9993)
+++ django/trunk/django/conf/__init__.py 2009-03-08 09:39:48 UTC (rev
9994)
@@ -92,7 +92,7 @@
app_subdirs = os.listdir(appdir)
app_subdirs.sort()
for d in app_subdirs:
- if d.isalpha() and os.path.isdir(os.path.join(appdir, d)):
+ if d.isalnum() and d[0].isalpha() and
os.path.isdir(os.path.join(appdir, d)):
new_installed_apps.append('%s.%s' % (app[:-2], d))
else:
new_installed_apps.append(app)
Added: django/trunk/tests/regressiontests/app_loading/__init__.py
===================================================================
Added: django/trunk/tests/regressiontests/app_loading/models.py
===================================================================
Added: django/trunk/tests/regressiontests/app_loading/parent/__init__.py
===================================================================
--- django/trunk/tests/regressiontests/app_loading/parent/__init__.py
(rev 0)
+++ django/trunk/tests/regressiontests/app_loading/parent/__init__.py
2009-03-08 09:39:48 UTC (rev 9994)
@@ -0,0 +1 @@
+# not empty to make SVN happy
Added: django/trunk/tests/regressiontests/app_loading/parent/app/__init__.py
===================================================================
--- django/trunk/tests/regressiontests/app_loading/parent/app/__init__.py
(rev 0)
+++ django/trunk/tests/regressiontests/app_loading/parent/app/__init__.py
2009-03-08 09:39:48 UTC (rev 9994)
@@ -0,0 +1 @@
+# not empty to make SVN happy
Added: django/trunk/tests/regressiontests/app_loading/parent/app1/__init__.py
===================================================================
--- django/trunk/tests/regressiontests/app_loading/parent/app1/__init__.py
(rev 0)
+++ django/trunk/tests/regressiontests/app_loading/parent/app1/__init__.py
2009-03-08 09:39:48 UTC (rev 9994)
@@ -0,0 +1 @@
+# not empty to make SVN happy
Added: django/trunk/tests/regressiontests/app_loading/test_settings.py
===================================================================
--- django/trunk/tests/regressiontests/app_loading/test_settings.py
(rev 0)
+++ django/trunk/tests/regressiontests/app_loading/test_settings.py
2009-03-08 09:39:48 UTC (rev 9994)
@@ -0,0 +1,3 @@
+INSTALLED_APPS = (
+ 'parent.*',
+)
Added: django/trunk/tests/regressiontests/app_loading/tests.py
===================================================================
--- django/trunk/tests/regressiontests/app_loading/tests.py
(rev 0)
+++ django/trunk/tests/regressiontests/app_loading/tests.py 2009-03-08
09:39:48 UTC (rev 9994)
@@ -0,0 +1,18 @@
+"""
+Test the globbing of INSTALLED_APPS.
+
+>>> import os, sys
+>>> old_sys_path = sys.path
+>>> sys.path.append(os.path.dirname(os.path.abspath(__file__)))
+
+>>> from django.conf import Settings
+
+>>> s = Settings('test_settings')
+
+>>> s.INSTALLED_APPS
+['parent.app', 'parent.app1']
+
+>>> sys.path = old_sys_path
+
+"""
+
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---