]> git.openstreetmap.org Git - osqa.git/commitdiff
Remove ADMIN_MEDIA_PREFIX since it has been deprecated in Django 1.4
authorAttila-Mihaly Balazs <dify.ltd@gmail.com>
Sat, 4 Jan 2014 11:09:35 +0000 (13:09 +0200)
committerAttila-Mihaly Balazs <dify.ltd@gmail.com>
Sat, 4 Jan 2014 11:09:35 +0000 (13:09 +0200)
forum/settings/__init__.py
forum/skins/default/templates/osqaadmin/djstyle_base.html
forum/skins/default/templates/osqaadmin/moderation.html
forum/skins/default/templates/osqaadmin/nodeman.html
settings.py

index 145859921fdcdc98c10c2a501da51a27d7f2a973..4120d2ba6737f5df56ac3b01466aa641e0898193 100644 (file)
@@ -27,7 +27,6 @@ APP_BASE_URL = djsettings.APP_BASE_URL
 FORCE_SCRIPT_NAME = djsettings.FORCE_SCRIPT_NAME
 OSQA_SKIN = djsettings.OSQA_DEFAULT_SKIN
 LANGUAGE_CODE = djsettings.LANGUAGE_CODE
 FORCE_SCRIPT_NAME = djsettings.FORCE_SCRIPT_NAME
 OSQA_SKIN = djsettings.OSQA_DEFAULT_SKIN
 LANGUAGE_CODE = djsettings.LANGUAGE_CODE
-ADMIN_MEDIA_PREFIX = djsettings.ADMIN_MEDIA_PREFIX
 ONLINE_USERS = Setting('ONLINE_USERS', {})
 
 
 ONLINE_USERS = Setting('ONLINE_USERS', {})
 
 
index bc7c12a0e800b01d3043f7717cd9c4c4373bbccc..32a87bc985e1aab890c019f6d0f5952a43c421f3 100644 (file)
@@ -1,4 +1,4 @@
-{% load extra_tags extra_filters i18n %}
+{% load extra_tags extra_filters i18n admin_static %}
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -6,10 +6,10 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/base.css" type="text/css"/>
-    <link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/forms.css" type="text/css"/>
-    <link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/changelists.css" type="text/css"/>
-    <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/ie.css" /><![endif]-->
+    <link rel="stylesheet" href="{% static 'admin/css/base.css' %}" type="text/css"/>
+    <link rel="stylesheet" href="{% static 'admin/css/forms.css' %}" type="text/css"/>
+    <link rel="stylesheet" href="{% static 'admin/css/changelists.css' %}" type="text/css"/>
+    <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% static 'admin/css/ie.css' %}" /><![endif]-->
     <link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/style/djstyle_admin.css" %}"/>
     <script src="http://www.google.com/jsapi" type="text/javascript"></script>
     <script type="text/javascript">
     <link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/style/djstyle_admin.css" %}"/>
     <script src="http://www.google.com/jsapi" type="text/javascript"></script>
     <script type="text/javascript">
@@ -60,7 +60,7 @@
                 <div id="changes-box" class="module">
                     <h2>{% trans "Unpublished changes" %}</h2>
                     <p>
                 <div id="changes-box" class="module">
                     <h2>{% trans "Unpublished changes" %}</h2>
                     <p>
-                        <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_alert.gif" />
+                        <img src="{% static 'admin/img/admin/icon_alert.gif' %}" />
                         {% trans "Items marked with this icon have unpublished changes." %}
                     </p>
                 </div>
                         {% trans "Items marked with this icon have unpublished changes." %}
                     </p>
                 </div>
                         <li><a href="{% url "admin_set" allsets.sidebar.name %}">{{ allsets.sidebar.title }}</a></li>
                         <li>
                             <a href="{% url "admin_set" allsets.css.name %}">{{ allsets.css.title }}</a>
                         <li><a href="{% url "admin_set" allsets.sidebar.name %}">{{ allsets.sidebar.title }}</a></li>
                         <li>
                             <a href="{% url "admin_set" allsets.css.name %}">{{ allsets.css.title }}</a>
-                            {% if "css"|contained_in:unsaved %}<img width="12" height="12" src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_alert.gif" alt="{% trans "Unsaved changes" %}" />{% endif %}
+                            {% if "css"|contained_in:unsaved %}<img width="12" height="12" src="{% static 'admin/img/admin/icon_alert.gif' %}" alt="{% trans "Unsaved changes" %}" />{% endif %}
                         </li>
                         <li>
                             <a href="{% url "admin_set" allsets.headandfoot.name %}">{{ allsets.headandfoot.title }}</a>
                         </li>
                         <li>
                             <a href="{% url "admin_set" allsets.headandfoot.name %}">{{ allsets.headandfoot.title }}</a>
-                            {% if "headandfoot"|contained_in:unsaved %}<img width="12" height="12" src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_alert.gif" alt="{% trans "Unsaved changes" %}" />{% endif %}
+                            {% if "headandfoot"|contained_in:unsaved %}<img width="12" height="12" src="{% static 'admin/img/admin/icon_alert.gif' %}" alt="{% trans "Unsaved changes" %}" />{% endif %}
                         </li>
                         <li>
                             <a href="{% url "admin_set" allsets.head.name %}">{{ allsets.head.title }}</a>
                         </li>
                         <li>
                             <a href="{% url "admin_set" allsets.head.name %}">{{ allsets.head.title }}</a>
-                            {% if "head"|contained_in:unsaved %}<img width="12" height="12" src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_alert.gif" alt="{% trans "Unsaved changes" %}" />{% endif %}
+                            {% if "head"|contained_in:unsaved %}<img width="12" height="12" src="{% static 'admin/img/admin/icon_alert.gif' %}" alt="{% trans "Unsaved changes" %}" />{% endif %}
                         </li>
                     </ul>
                 </div>
                         </li>
                     </ul>
                 </div>
                     {% for set in othersets %}
                         <li>
                             <a href="{% url "admin_set" set.name %}">{{ set.title }}</a>
                     {% for set in othersets %}
                         <li>
                             <a href="{% url "admin_set" set.name %}">{{ set.title }}</a>
-                            {% if set.name|contained_in:unsaved %}<img width="12" height="12" src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_alert.gif" alt="{% trans "Unsaved changes" %}" />{% endif %}
+                            {% if set.name|contained_in:unsaved %}<img width="12" height="12" src="{% static 'admin/img/admin/icon_alert.gif' %}" alt="{% trans "Unsaved changes" %}" />{% endif %}
                         </li>
                     {% endfor %}
                     </ul>
                         </li>
                     {% endfor %}
                     </ul>
index 050f1f176aef861a6447a0c779fb091f48068243..b17792cc70f4a0c29c9bb7a35f862fef7e383dc2 100644 (file)
@@ -1,6 +1,6 @@
 {% extends basetemplate %}
 
 {% extends basetemplate %}
 
-{% load i18n humanize %}
+{% load i18n humanize admin_static %}
 
 {% block subtitle %}{% trans "Moderation" %}{% endblock %}
 {% block pagename %}{% trans "Moderation" %}{% endblock %}
 
 {% block subtitle %}{% trans "Moderation" %}{% endblock %}
 {% block pagename %}{% trans "Moderation" %}{% endblock %}
@@ -56,9 +56,9 @@
                         <p><a href="{{ cheater.get_profile_url }}">{{ cheater.username }}</a></p>
                         <p><b>{% trans "Email" %}</b>
                         {% if cheater.email_isvalid %}
                         <p><a href="{{ cheater.get_profile_url }}">{{ cheater.username }}</a></p>
                         <p><b>{% trans "Email" %}</b>
                         {% if cheater.email_isvalid %}
-                            <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-yes.gif" alt="{% trans "Validated" %}" />
+                            <img src="{% static 'img/admin/icon-yes.gif' %}" alt="{% trans "Validated" %}" />
                         {% else %}
                         {% else %}
-                            <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-no.gif" alt="{% trans "Not validated" %}" />
+                            <img src="{% static 'img/admin/icon-no.gif' %}" alt="{% trans "Not validated" %}" />
                         {% endif %}
                         <a href="mailto: {{ cheater.email }}">{{ cheater.email }}</a></p>
                         <p><b>{% trans "Reputation:" %}</b> {{ cheater.reputation|intcomma }}</p>
                         {% endif %}
                         <a href="mailto: {{ cheater.email }}">{{ cheater.email }}</a></p>
                         <p><b>{% trans "Reputation:" %}</b> {{ cheater.reputation|intcomma }}</p>
@@ -80,9 +80,9 @@
                                 <td><a href="{{ fake.get_profile_url }}">{{ fake.username }}</a></td>
                                 <td>
                                     {% if fake.email_isvalid %}
                                 <td><a href="{{ fake.get_profile_url }}">{{ fake.username }}</a></td>
                                 <td>
                                     {% if fake.email_isvalid %}
-                                        <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-yes.gif" alt="{% trans "Validated" %}" />
+                                        <img src="{% static 'img/admin/icon-yes.gif' %}" alt="{% trans "Validated" %}" />
                                     {% else %}
                                     {% else %}
-                                        <img src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon-no.gif" alt="{% trans "Not validated" %}" />
+                                        <img src="{% static 'img/admin/icon-no.gif' %}" alt="{% trans "Not validated" %}" />
                                     {% endif %}
                                     <a href="mailto: {{ fake.email }}">{{ fake.email }}</a>
                                 </td>
                                     {% endif %}
                                     <a href="mailto: {{ fake.email }}">{{ fake.email }}</a>
                                 </td>
@@ -99,4 +99,4 @@
         </table>
         {% endif %}
     </div>
         </table>
         {% endif %}
     </div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index 34aa25ffda5893c09d89de9767c4d1e6acc263bd..784d49aa7a8f8b57a2cc089b0da379e2a89ded33 100644 (file)
@@ -1,6 +1,6 @@
 {% extends basetemplate %}
 
 {% extends basetemplate %}
 
-{% load i18n user_tags extra_tags extra_filters %}
+{% load i18n user_tags extra_tags extra_filters admin_static %}
 
 {% block adminjs %}
     <script type="text/javascript">
 
 {% block adminjs %}
     <script type="text/javascript">
             padding: 0 0 0 0;
         }
     </style>
             padding: 0 0 0 0;
         }
     </style>
-    <script type="text/javascript">window.__admin_media_prefix__ = "{{ settings.ADMIN_MEDIA_PREFIX }}";</script>
-    <link href="{{ settings.ADMIN_MEDIA_PREFIX }}css/base.css" rel="stylesheet" type="text/css" media="screen" />
+    <link href="{% static 'admin/css/base.css' %}" rel="stylesheet" type="text/css" media="screen" />
     <script type="text/javascript">
     /* gettext identity library */
 
     <script type="text/javascript">
     /* gettext identity library */
 
     }
     
     </script>
     }
     
     </script>
-    <script type="text/javascript" src="{{ settings.ADMIN_MEDIA_PREFIX }}js/core.js"></script>
+    <script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
 {% endblock %}
 
 {% block subtitle %}
 {% endblock %}
 
 {% block subtitle %}
             {% csrf_token %}
             <div>
                 <div>
             {% csrf_token %}
             <div>
                 <div>
-                    <label><img alt="Search" src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_searchbox.png"></label>
+                    <label><img alt="Search" src="{% static 'admin/img/admin/icon_searchbox.png' %}"></label>
                     <input type="text" size="40" name="text" id="text-filter-input" value="{{ text }}">
                     <input type="submit" value="{% trans "Search" %}">
                     {% if text %}
                     <input type="text" size="40" name="text" id="text-filter-input" value="{{ text }}">
                     <input type="submit" value="{% trans "Search" %}">
                     {% if text %}
             {{ nodes.paginator.page_numbers }}
         </form>
     </div>
             {{ nodes.paginator.page_numbers }}
         </form>
     </div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index 1bb2e752b8735eff6a2490dd1ef3d40528687dab..0c0495ab5c8c9503edb6eabc6276f00ad2844ffc 100644 (file)
@@ -4,7 +4,6 @@ import sys
 
 SITE_ID = 1
 
 
 SITE_ID = 1
 
-ADMIN_MEDIA_PREFIX = '/admin_media/'
 SECRET_KEY = 'a;::qCl1mfh?avagttOJ;8f5Rr54d,9qy7;o15M2cYO75?OQo51u3LnQ;!8N.:,7'
 
 CACHE_MAX_KEY_LENGTH = 235
 SECRET_KEY = 'a;::qCl1mfh?avagttOJ;8f5Rr54d,9qy7;o15M2cYO75?OQo51u3LnQ;!8N.:,7'
 
 CACHE_MAX_KEY_LENGTH = 235