Author: brosner
Date: Tue Oct 14 00:18:25 2008
New Revision: 1040
Modified:
trunk/apps/local_apps/core/templatetags/svn_app_version.py
Log:
Fixed the infamous _avatar bug. Worked around a Python bug that double
initializes a module. Use get_app that safely imports apps. See
http://bugs.python.org/issue2090 which Django won't handle 100% correctly,
but technically Django is not at fault here.
Modified: trunk/apps/local_apps/core/templatetags/svn_app_version.py
==============================================================================
--- trunk/apps/local_apps/core/templatetags/svn_app_version.py (original)
+++ trunk/apps/local_apps/core/templatetags/svn_app_version.py Tue Oct 14
00:18:25 2008
@@ -5,6 +5,7 @@
from os.path import abspath
from os.path import dirname as dn
from django.utils.version import get_svn_revision
+from django.db.models.loading import get_app
register = template.Library()
@@ -27,7 +28,7 @@
version = 'SVN-None'
else:
try:
- module = __import__(appname,{},{},[''])
+ module = get_app(appname)
except:
if not fail_silently: raise
version = 'SVN-Error'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-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/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---