Skip to content

Commit

Permalink
add STATIC_URL to panel context
Browse files Browse the repository at this point in the history
  • Loading branch information
issackelly committed Feb 16, 2011
1 parent 4745de7 commit ab94e7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion servee/contrib/media/document/panels.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions servee/contrib/media/image/panels.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)

Expand Down
5 changes: 3 additions & 2 deletions servee/contrib/media/video/panels.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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'

0 comments on commit ab94e7c

Please sign in to comment.