From ab94e7ce8bc737c314b53795d3cb40325e54b55a Mon Sep 17 00:00:00 2001 From: Issac Kelly Date: Tue, 15 Feb 2011 22:43:44 -0500 Subject: [PATCH] add STATIC_URL to panel context --- servee/contrib/media/document/panels.py | 3 ++- servee/contrib/media/image/panels.py | 5 +++-- servee/contrib/media/video/panels.py | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/servee/contrib/media/document/panels.py b/servee/contrib/media/document/panels.py index 475be83..478963a 100644 --- a/servee/contrib/media/document/panels.py +++ b/servee/contrib/media/document/panels.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.template.loader import render_to_string from servee.contrib.media.document.forms import DocumentUpload from servee.contrib.media.document.models import Document @@ -19,7 +20,7 @@ def content(self): form = DocumentUpload() context = self.context.copy() - context.update(dict(documents=documents, form=form)) + context.update(dict(documents=documents, form=form, STATIC_URL=settings.STATIC_URL)) return render_to_string('panels/document.html', context) def url(self): diff --git a/servee/contrib/media/image/panels.py b/servee/contrib/media/image/panels.py index e1d1d19..c9db760 100644 --- a/servee/contrib/media/image/panels.py +++ b/servee/contrib/media/image/panels.py @@ -1,5 +1,6 @@ -from servee.wysiwyg.panels import InsertPanel +from django.conf import settings from django.template.loader import render_to_string +from servee.wysiwyg.panels import InsertPanel from servee.contrib.media.image.forms import ImageUpload from servee.contrib.media.image.models import Image @@ -19,7 +20,7 @@ def content(self): form = ImageUpload() context = self.context.copy() - context.update(dict(images=images, form=form)) + context.update(dict(images=images, form=form, STATIC_URL=settings.STATIC_URL)) return render_to_string('panels/image.html', context) diff --git a/servee/contrib/media/video/panels.py b/servee/contrib/media/video/panels.py index e6b0ebb..709b65c 100644 --- a/servee/contrib/media/video/panels.py +++ b/servee/contrib/media/video/panels.py @@ -1,5 +1,6 @@ -from servee.wysiwyg.panels import InsertPanel +from django.conf import settings from django.template.loader import render_to_string +from servee.wysiwyg.panels import InsertPanel from servee.contrib.media.video.models import Video from servee.contrib.media.video.forms import VideoUpload @@ -17,7 +18,7 @@ def title(self): def content(self): videos = Video.objects.all() form = VideoUpload() - return render_to_string('panels/video.html', dict(videos=videos, form=form)) + return render_to_string('panels/video.html', dict(videos=videos, form=form, STATIC_URL=settings.STATIC_URL)) def url(self): return '#insert_video' \ No newline at end of file