Stephen McDonald avatar Stephen McDonald committed 331a033 Draft

Removed all use of Django's deprecated ADMIN_MEDIA_PREFIX since we no longer support Django 1.3

Comments (0)

Files changed (9)

filebrowser_safe/settings.py

     DEFAULT_URL_TINYMCE = tinymce.settings.JS_BASE_URL + '/'
     DEFAULT_PATH_TINYMCE = tinymce.settings.JS_ROOT + '/'
 except ImportError:
-    DEFAULT_URL_TINYMCE = settings.ADMIN_MEDIA_PREFIX + "tinymce/jscripts/tiny_mce/"
+    DEFAULT_URL_TINYMCE = settings.STATIC_URL + "grappelli/tinymce/jscripts/tiny_mce/"
     DEFAULT_PATH_TINYMCE = os.path.join(settings.MEDIA_ROOT, 'admin/tinymce/jscripts/tiny_mce/')
 
 # Set to True in order to see the FileObject when Browsing.

filebrowser_safe/templates/filebrowser/include/filelisting.html

-{% load i18n future adminmedia fb_tags mezzanine_tags %}
+{% load i18n future static fb_tags mezzanine_tags %}
 
 {% if query.pop %}
 <style>

filebrowser_safe/templates/filebrowser/include/search.html

-{% load i18n adminmedia fb_tags %}
+{% load i18n static fb_tags %}
 <div class="search-results">
     <p>{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %}</p>
     <span class="quiet">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</span>
 <div id="toolbar">
     <form id="changelist-search" action="." method="get">
         <div><!-- DIV needed for valid HTML -->
-        <label for="searchbar"><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" alt="Search" /></label>
+        <label for="searchbar"><img src="{% static "grappelli/" %}img/admin/icon_searchbox.png" alt="Search" /></label>
         <input type="text" size="40" name="q" value="{{ q }}" id="searchbar" />
         {% if query.filter_type %}<input type="hidden" name="filter_type" value="{{ query.filter_type }}" />{% endif %}
         {% if query.filter_date %}<input type="hidden" name="filter_date" value="{{ query.filter_date }}" />{% endif %}

filebrowser_safe/templates/filebrowser/include/toolbar.html

-{% load i18n adminmedia fb_tags %}
+{% load i18n static fb_tags %}
 
 {% if results_var.results_total %}
 {% if query.filter_type or query.filter_date or query.q %}

filebrowser_safe/templates/filebrowser/index.html

 {% extends "admin/base_site.html" %}
 
 <!-- LOADING -->
-{% load i18n future adminmedia fb_tags fb_pagination %}
+{% load i18n future static fb_tags fb_pagination %}
 
 <!-- STYLESHEETS -->
 {% block stylesheets %}
     {{ block.super }}
-    <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelist.css" />
+    <link rel="stylesheet" type="text/css" href="{% static "grappelli/" %}css/changelist.css" />
     <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}css/filebrowser.css" />
 {% endblock %}
 
 
 {{ media }}
 
-<script type="text/javascript" src="{% admin_media_prefix %}js/admin/Changelist.js"></script>
+<script type="text/javascript" src="{% static "grappelli/" %}js/admin/Changelist.js"></script>
 
 {% if not actions_on_top and not actions_on_bottom %}
 <style>

filebrowser_safe/templates/filebrowser/makedir.html

 {% extends "admin/base_site.html" %}
 
 <!-- LOADING -->
-{% load i18n adminmedia fb_tags %}
+{% load i18n static fb_tags %}
 
 <!-- STYLESHEETS -->
 {% block stylesheets %}
     {{ block.super }}
-    <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />
+    <link rel="stylesheet" type="text/css" href="{% static "grappelli/" %}css/forms.css" />
     <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}css/filebrowser.css" />
 {% endblock %}
 

filebrowser_safe/templates/filebrowser/rename.html

 {% extends "admin/base_site.html" %}
 
 <!-- LOADING -->
-{% load i18n adminmedia fb_tags %}
+{% load i18n static fb_tags %}
 
 <!-- STYLESHEETS -->
 {% block stylesheets %}
     {{ block.super }}
-    <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />
+    <link rel="stylesheet" type="text/css" href="{% static "grappelli/" %}css/forms.css" />
     <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}css/filebrowser.css" />
 {% endblock %}
 

filebrowser_safe/templates/filebrowser/upload.html

 {% extends "admin/base_site.html" %}
 
 <!-- LOADING -->
-{% load i18n future adminmedia fb_tags mezzanine_tags %}
+{% load i18n future static fb_tags mezzanine_tags %}
 
 <!-- STYLESHEETS -->
 {% block stylesheets %}
     {{ block.super }}
-    <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />
+    <link rel="stylesheet" type="text/css" href="{% static "grappelli/" %}css/forms.css" />
     <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}css/filebrowser.css" />
     <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/uploadify.css" />
 {% endblock %}
 {% block javascripts %}
     {{ block.super }}
     <script type="text/javascript" src="../../jsi18n/"></script>
-    <script type="text/javascript" src="{% admin_media_prefix %}js/core.js"></script>
+    <script type="text/javascript" src="{% static "grappelli/" %}js/core.js"></script>
     <script type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/jquery-1.4.2.min.js"></script>
     <script type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/jquery.uploadify.v2.1.4.min.js"></script>
     <script type="text/javascript" src="{{ settings_var.URL_FILEBROWSER_MEDIA }}uploadify/swfobject.js"></script>
-    <script type="text/javascript" src="{% admin_media_prefix %}js/admin/CollapsedFieldsets.js"></script>
+    <script type="text/javascript" src="{% static "grappelli/" %}js/admin/CollapsedFieldsets.js"></script>
     <script type="text/javascript">
     $(document).ready(function() {
         {% url "static_proxy" as static_proxy_url %}

filebrowser_safe/urls.py

-from django.conf.urls.defaults import *
+
+from django.conf.urls import *
 
 urlpatterns = patterns('',
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.