From a225ace91dadb64bb1ffe43860f0cdb2661b8b58 Mon Sep 17 00:00:00 2001
From: Branson Stephens <branson.stephens@ligo.org>
Date: Thu, 21 Aug 2014 12:06:18 -0500
Subject: [PATCH] Replaced MEDIA_URL with STATIC_URL. Too confusing to have
 both

---
 settings/branson.py                 |  3 ++-
 settings/default.py                 |  4 ++--
 templates/admin/base_site.html      |  2 +-
 templates/base.html                 | 14 +++++++-------
 templates/gracedb/event_detail.html |  4 ++--
 templates/gracedb/event_list.html   | 20 ++++++++++----------
 6 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/settings/branson.py b/settings/branson.py
index fbd082442..dd1889e86 100644
--- a/settings/branson.py
+++ b/settings/branson.py
@@ -12,7 +12,8 @@ DATABASES = {
     }
 }
 
-MEDIA_URL = "/branson-static/"
+#MEDIA_URL = "/branson-static/"
+STATIC_URL = "/branson-static/"
 STATIC_ROOT = "/home/branson/gracedbdev/static/"
 
 GRACEDB_DATA_DIR = "/home/branson/fake_data"
diff --git a/settings/default.py b/settings/default.py
index 2ca3af00a..d38076b9b 100644
--- a/settings/default.py
+++ b/settings/default.py
@@ -137,12 +137,12 @@ USE_I18N = False
 
 # Absolute path to the directory that holds media.
 # Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = ''
+#MEDIA_ROOT = ''
 
 # 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/"
-MEDIA_URL = '/gracedb-static/'
+#MEDIA_URL = '/gracedb-static/'
 
 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 # trailing slash.
diff --git a/templates/admin/base_site.html b/templates/admin/base_site.html
index f0d4df872..c9894d6f2 100644
--- a/templates/admin/base_site.html
+++ b/templates/admin/base_site.html
@@ -2,7 +2,7 @@
 {% load i18n %}
 
 {% block extrastyle %}
-    <link rel="stylesheet" href="{{MEDIA_URL}}css/admin-nav.css" />
+    <link rel="stylesheet" href="{{STATIC_URL}}css/admin-nav.css" />
 {% endblock %}
 
 
diff --git a/templates/base.html b/templates/base.html
index 9333e798e..046c2273d 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -2,7 +2,7 @@
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
-    <link rel="stylesheet" href="{{MEDIA_URL}}css/style.css" />
+    <link rel="stylesheet" href="{{STATIC_URL}}css/style.css" />
     <title>GraceDb | {% block title %}{% endblock %}</title>
 <!-- START TESTING -->
 <script type="text/javascript">
@@ -68,28 +68,28 @@ function changeTime(obj, label) {
  <table align="center" width="90%%">
   <tr>
    <td align="center">
-    <img width="52" height="36" src="{{MEDIA_URL}}images/ligo-blue.gif">
+    <img width="52" height="36" src="{{STATIC_URL}}images/ligo-blue.gif">
     <!-- 673px 487px -->
    </td>
 
    <td align="center">
-    <img width="164" height="30" src="{{MEDIA_URL}}images/Virgo_logo50.png">
+    <img width="164" height="30" src="{{STATIC_URL}}images/Virgo_logo50.png">
     <!-- 4,829px 884px -->
    </td>
 
    <td align="center">
     {% if user and user.username == "chad.hanna@LIGO.ORG" %}
-        <img width="194" height="37" src="{{MEDIA_URL}}images/PI_Logo-anim.gif">
+        <img width="194" height="37" src="{{STATIC_URL}}images/PI_Logo-anim.gif">
     {% else %}{% if user and user.username == "kipp.cannon@LIGO.ORG" %}
-        <img width="194" height="37" src="{{MEDIA_URL}}images/CITA_logo-anim.gif">
+        <img width="194" height="37" src="{{STATIC_URL}}images/CITA_logo-anim.gif">
     {% else %}
-        <img width="107" height="37" src="{{MEDIA_URL}}images/anim2.gif">
+        <img width="107" height="37" src="{{STATIC_URL}}images/anim2.gif">
     {% endif %}{% endif %}
     <!-- 287px 101px -->
    </td>
 
    <td align="center">
-    <img width="87" height="37" src="{{MEDIA_URL}}images/LSC_logo50.png">
+    <img width="87" height="37" src="{{STATIC_URL}}images/LSC_logo50.png">
     <!-- 6,261px 2,652px -->
    </td>
   </tr>
diff --git a/templates/gracedb/event_detail.html b/templates/gracedb/event_detail.html
index 181ee6436..5ea75b0aa 100644
--- a/templates/gracedb/event_detail.html
+++ b/templates/gracedb/event_detail.html
@@ -13,8 +13,8 @@
       src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
     </script>
     <script src="http{% if request.is_secure %}s{% endif %}://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/dojo.js" type="text/javascript"></script>
-    <script src="{{MEDIA_URL}}js/labeltips.js" type="text/javascript"></script>
-    <link rel="stylesheet" href="{{MEDIA_URL}}css/labeltips.css">
+    <script src="{{STATIC_URL}}js/labeltips.js" type="text/javascript"></script>
+    <link rel="stylesheet" href="{{STATIC_URL}}css/labeltips.css">
     <style>
         .emptyIcon{
             background-image: none;
diff --git a/templates/gracedb/event_list.html b/templates/gracedb/event_list.html
index d3969efc9..56f789b9c 100644
--- a/templates/gracedb/event_list.html
+++ b/templates/gracedb/event_list.html
@@ -8,27 +8,27 @@
 {% block jscript %}
 
 <link rel="stylesheet" type="text/css" media="screen"
-      href="{{MEDIA_URL}}css/jqgrid/theme/jquery-ui.css"/>
+      href="{{STATIC_URL}}css/jqgrid/theme/jquery-ui.css"/>
 
 <link rel="stylesheet" type="text/css" media="screen"
-      href="{{MEDIA_URL}}css/jqgrid/theme/ui.all.css"/>
+      href="{{STATIC_URL}}css/jqgrid/theme/ui.all.css"/>
 
 <!--
 <link rel="stylesheet" type="text/css" media="screen"
-      href="{{MEDIA_URL}}css/jqgrid/ui-lightness/jquery-ui-1.7.2.custom.css"/>
+      href="{{STATIC_URL}}css/jqgrid/ui-lightness/jquery-ui-1.7.2.custom.css"/>
 -->
 
 <link rel="stylesheet" type="text/css" media="screen"
-      href="{{MEDIA_URL}}css/jqgrid/ui.jqgrid.css"/>
+      href="{{STATIC_URL}}css/jqgrid/ui.jqgrid.css"/>
 
-<script src="{{MEDIA_URL}}js/jquery-1.3.2.min.js" type="text/javascript"></script>
-<script src="{{MEDIA_URL}}js/grid.locale-en.js" type="text/javascript"></script>
-<script src="{{MEDIA_URL}}js/jquery.jqGrid.min.js" type="text/javascript"></script>
-<script src="{{MEDIA_URL}}js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
+<script src="{{STATIC_URL}}js/jquery-1.3.2.min.js" type="text/javascript"></script>
+<script src="{{STATIC_URL}}js/grid.locale-en.js" type="text/javascript"></script>
+<script src="{{STATIC_URL}}js/jquery.jqGrid.min.js" type="text/javascript"></script>
+<script src="{{STATIC_URL}}js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
 
 
-<script src="{{MEDIA_URL}}js/labeltips.js" type="text/javascript"></script>
-<link rel="stylesheet" href="{{MEDIA_URL}}css/labeltips.css">
+<script src="{{STATIC_URL}}js/labeltips.js" type="text/javascript"></script>
+<link rel="stylesheet" href="{{STATIC_URL}}css/labeltips.css">
 
     <script type="text/javascript">
     <!--
-- 
GitLab