Skip to content

Commit

Permalink
remove cachebuster requirement
Browse files Browse the repository at this point in the history
We can use staticfiles for the `static` tag, and just not use a `media`
tag.
  • Loading branch information
gavinwahl committed Aug 5, 2013
1 parent 6d23387 commit 50af146
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions demo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,6 @@
)

WIDGY_MEZZANINE_SITE = 'demo.widgy.widgy_site'

MEDIA_ROOT = os.path.join(BASE_DIR, 'demo', 'media')
MEDIA_URL = '/media/'
1 change: 1 addition & 0 deletions docs/tutorials/widgy-mezzanine-tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.

Expand Down
Original file line number Diff line number Diff line change
@@ -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 %}
<img src="{% media im.name %}">
<img src="{{ im.url }}">
{% else %}
<div class="noImage"></div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load thumbnail_libs %}

{% sorl_thumbnail self.image.file.name "500x500" upscale=False as im %}
<img src="{% media im.name %}" alt="{{ self.image.label }}">
<img src="{{ im.url }}" alt="{{ self.image.label }}">
{% endthumbnail %}
2 changes: 1 addition & 1 deletion widgy/templates/admin/filer/base_site.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "admin/base_site.html" %}
{% load i18n filermedia %}
{% load compress %}
{% load compress staticfiles %}

{% block extrastyle %}{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% filer_staticmedia_prefix %}css/admin_style.css" />
Expand Down

0 comments on commit 50af146

Please # to comment.