From 50af1460b2038e04f431b053639828c99811cac1 Mon Sep 17 00:00:00 2001 From: Gavin Wahl Date: Mon, 5 Aug 2013 14:54:58 -0600 Subject: [PATCH] remove cachebuster requirement We can use staticfiles for the `static` tag, and just not use a `media` tag. --- demo/settings.py | 3 +++ docs/tutorials/widgy-mezzanine-tutorial.rst | 1 + .../templates/widgy/page_builder/image/preview.html | 4 ++-- .../templates/widgy/page_builder/image/render.html | 2 +- widgy/templates/admin/filer/base_site.html | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/demo/settings.py b/demo/settings.py index 81f0bd0a8..cce1479fa 100644 --- a/demo/settings.py +++ b/demo/settings.py @@ -168,3 +168,6 @@ ) WIDGY_MEZZANINE_SITE = 'demo.widgy.widgy_site' + +MEDIA_ROOT = os.path.join(BASE_DIR, 'demo', 'media') +MEDIA_URL = '/media/' diff --git a/docs/tutorials/widgy-mezzanine-tutorial.rst b/docs/tutorials/widgy-mezzanine-tutorial.rst index 333f364f7..eac929f8d 100644 --- a/docs/tutorials/widgy-mezzanine-tutorial.rst +++ b/docs/tutorials/widgy-mezzanine-tutorial.rst @@ -45,6 +45,7 @@ add required Widgy apps to ``INSTALLED_APPS``:: 'sorl.thumbnail', 'south', + ``django.contrib.admin`` should be installed after Mezzanine and Widgy, so move it under them in ``INSTALLED_APPS``. diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/image/preview.html b/widgy/contrib/page_builder/templates/widgy/page_builder/image/preview.html index 30ca41199..2e486be44 100644 --- a/widgy/contrib/page_builder/templates/widgy/page_builder/image/preview.html +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/image/preview.html @@ -1,10 +1,10 @@ {% extends 'widgy/preview.html' %} -{% load thumbnail_libs %} +{% load thumbnail_libs %} {% block content %} {% if self.image %} {% easy_thumbnail self.image.file "100x100" as im %} - + {% else %}
{% endif %} diff --git a/widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html b/widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html index b21351e2b..c57c751e6 100644 --- a/widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html +++ b/widgy/contrib/page_builder/templates/widgy/page_builder/image/render.html @@ -1,5 +1,5 @@ {% load thumbnail_libs %} {% sorl_thumbnail self.image.file.name "500x500" upscale=False as im %} - {{ self.image.label }} + {{ self.image.label }} {% endthumbnail %} diff --git a/widgy/templates/admin/filer/base_site.html b/widgy/templates/admin/filer/base_site.html index 431d6035b..e7df6a48a 100644 --- a/widgy/templates/admin/filer/base_site.html +++ b/widgy/templates/admin/filer/base_site.html @@ -1,6 +1,6 @@ {% extends "admin/base_site.html" %} {% load i18n filermedia %} -{% load compress %} +{% load compress staticfiles %} {% block extrastyle %}{{ block.super }}