diff mbox

[Branch,~linaro-validation/lava-server/trunk] Rev 366: more django 1.4ness: admin needs to be in STATICFILES_PREPEND_LABEL_APPS iff we are running befor...

Message ID 20120507034711.18134.96733.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson May 7, 2012, 3:47 a.m. UTC
------------------------------------------------------------
revno: 366
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Mon 2012-05-07 15:45:39 +1200
message:
  more django 1.4ness: admin needs to be in STATICFILES_PREPEND_LABEL_APPS iff we are running before 1.4
modified:
  lava_server/settings/common.py


--
lp:lava-server
https://code.launchpad.net/~linaro-validation/lava-server/trunk

You are subscribed to branch lp:lava-server.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_server/settings/common.py'
--- lava_server/settings/common.py	2012-05-07 02:58:11 +0000
+++ lava_server/settings/common.py	2012-05-07 03:45:39 +0000
@@ -69,10 +69,14 @@ 
     "static",
 )
 
+import django
+
 STATICFILES_PREPEND_LABEL_APPS = [
-    "django.contrib.admin",
 ]
 
+if django.VERSION < (1, 4):
+    STATICFILES_PREPEND_LABEL_APPS.append("django.contrib.admin")
+
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 # trailing slash if there is a path component (optional in other cases).
 # Examples: "http://media.lawrence.com", "http://example.com/media/"