diff --git a/openstack_dashboard/dashboards/project/containers/tables.py b/openstack_dashboard/dashboards/project/containers/tables.py
index fef97c5842..b283a72d8b 100644
--- a/openstack_dashboard/dashboards/project/containers/tables.py
+++ b/openstack_dashboard/dashboards/project/containers/tables.py
@@ -13,13 +13,11 @@
# under the License.
import logging
-from django.conf import settings
from django.core.urlresolvers import reverse
from django import shortcuts
from django import template
from django.template import defaultfilters as filters
from django.utils import http
-from django.utils import safestring
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
@@ -32,8 +30,6 @@ from openstack_dashboard.api import swift
from openstack_dashboard.dashboards.project.containers import utils
LOG = logging.getLogger(__name__)
-static_url = getattr(settings, 'STATIC_URL', '/static/')
-LOADING_IMAGE = '' % static_url
class ViewContainer(tables.LinkAction):
@@ -240,7 +236,9 @@ class ContainerAjaxUpdateRow(tables.Row):
def get_metadata(container):
# If the metadata has not been loading, display a loading image
if not hasattr(container, 'is_public'):
- return safestring.mark_safe(LOADING_IMAGE)
+ return template.loader.render_to_string(
+ 'project/containers/_container_loader.html'
+ )
template_name = 'project/containers/_container_metadata.html'
context = {"container": container}
return template.loader.render_to_string(template_name, context)
diff --git a/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html b/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html
new file mode 100644
index 0000000000..1f42aaf4ca
--- /dev/null
+++ b/openstack_dashboard/dashboards/project/containers/templates/containers/_container_loader.html
@@ -0,0 +1,5 @@
+