Author: mtredinnick
Date: 2009-01-19 06:48:41 -0600 (Mon, 19 Jan 2009)
New Revision: 9776

Modified:
   django/branches/releases/1.0.X/AUTHORS
   django/branches/releases/1.0.X/django/core/management/__init__.py
Log:
[1.0.X] Fixed #9789 -- Handle jython's compiled settings filename correctly.
Patch from Frank Wierzbicki.

Backport of r9775 from trunk.

Modified: django/branches/releases/1.0.X/AUTHORS
===================================================================
--- django/branches/releases/1.0.X/AUTHORS      2009-01-19 12:46:54 UTC (rev 
9775)
+++ django/branches/releases/1.0.X/AUTHORS      2009-01-19 12:48:41 UTC (rev 
9776)
@@ -418,6 +418,7 @@
     Chris Wesseling <[email protected]>
     James Wheare <[email protected]>
     Mike Wiacek <[email protected]>
+    Frank Wierzbicki
     [email protected]
     Rachel Willmer <http://www.willmer.com/kb/>
     Gary Wilson <[email protected]>

Modified: django/branches/releases/1.0.X/django/core/management/__init__.py
===================================================================
--- django/branches/releases/1.0.X/django/core/management/__init__.py   
2009-01-19 12:46:54 UTC (rev 9775)
+++ django/branches/releases/1.0.X/django/core/management/__init__.py   
2009-01-19 12:48:41 UTC (rev 9776)
@@ -311,7 +311,14 @@
     if project_directory == os.curdir or not project_directory:
         project_directory = os.getcwd()
     project_name = os.path.basename(project_directory)
+
+    # Strip filename suffix to get the module name.
     settings_name = os.path.splitext(settings_filename)[0]
+
+    # Strip $py for Jython compiled files (like settings$py.class)
+    if settings_name.endswith("$py"):
+        settings_name = settings_name[:-3]
+
     sys.path.append(os.path.join(project_directory, os.pardir))
     project_module = __import__(project_name, {}, {}, [''])
     sys.path.pop()


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to