Permalink
Browse files

i somehow got it backwards .. STATIC_URL is for django 1.4, anyway

  • Loading branch information...
1 parent 603a445 commit 08193500b145e7f8bacd5962c4a4f5b08e8e711f @hpoul committed Mar 17, 2012
Showing with 50 additions and 50 deletions.
  1. +1 −1 examples/buildout_project/sph_project/apps/sph_theme/templates/_footer.html
  2. +1 −1 examples/buildout_project/sph_project/apps/sph_theme/templates/base_root.html
  3. +1 −1 examples/buildout_project/sph_project/settings.py
  4. +1 −1 examples/simpleproject/settings.py
  5. +2 −2 sphenecoll/sphene/community/__init__.py
  6. +1 −1 sphenecoll/sphene/community/sphsettings.py
  7. +2 −2 sphenecoll/sphene/community/sphutils.py
  8. +1 −1 sphenecoll/sphene/community/templates/sphene/base.html
  9. +1 −1 sphenecoll/sphene/community/templates/sphene/community/admin/users_list.html
  10. +2 −2 sphenecoll/sphene/community/templatetags/sph_extras.py
  11. +1 −1 sphenecoll/sphene/community/widgets.py
  12. +7 −7 sphenecoll/sphene/sphblockframework/__init__.py
  13. +1 −1 sphenecoll/sphene/sphblog/templates/sphene/sphblog/base.html
  14. +1 −1 sphenecoll/sphene/sphblog/templates/sphene/sphblog/show_blogentry.html
  15. +2 −2 sphenecoll/sphene/sphboard/__init__.py
  16. +2 −2 sphenecoll/sphene/sphboard/lists.py
  17. +1 −1 sphenecoll/sphene/sphboard/templates/sphene/sphboard/_displayCategories.html
  18. +5 −5 sphenecoll/sphene/sphboard/templates/sphene/sphboard/_displayPostForm.html
  19. +1 −1 sphenecoll/sphene/sphboard/templates/sphene/sphboard/admin_user_posts.html
  20. +1 −1 sphenecoll/sphene/sphboard/templates/sphene/sphboard/base.html
  21. +1 −1 sphenecoll/sphene/sphboard/templates/sphene/sphboard/listCategories.html
  22. +2 −2 sphenecoll/sphene/sphquestions/templates/sphene/sphquestions/_answervoting.html
  23. +6 −6 sphenecoll/sphene/sphquestions/templates/sphene/sphquestions/thread_list.html
  24. +1 −1 sphenecoll/sphene/sphquestions/templatetags/sphquestions_extras.py
  25. +1 −1 sphenecoll/sphene/sphsearchboard/templates/sphene/sphsearchboard/base.html
  26. +1 −1 sphenecoll/sphene/sphwiki/models.py
  27. +1 −1 sphenecoll/sphene/sphwiki/templates/sphene/sphwiki/base.html
  28. +1 −1 sphenecoll/sphene/sphwiki/templates/sphene/sphwiki/editSnip.html
  29. +1 −1 sphenecoll/sphene/sphwiki/templates/sphene/sphwiki/listAttachments.html
@@ -1,6 +1,6 @@
{# I would appreciate if you could put a similar notice on your website pointing to http://sct.sphene.net - Thank you. #}
<div id="poweredby">
-<a href="http://sct.sphene.net/"><img src="{{ MEDIA_URL }}sphene/community/logo/sct-powered-124x25.png" border="0" alt="Powered by Sphene Community Tools" title="Powered by Sphene Community Tools" width="124px" height="25px" /></a>
+<a href="http://sct.sphene.net/"><img src="{{ STATIC_URL }}sphene/community/logo/sct-powered-124x25.png" border="0" alt="Powered by Sphene Community Tools" title="Powered by Sphene Community Tools" width="124px" height="25px" /></a>
</div>
{% comment %}
or feel free to use a simple text link like:
@@ -25,7 +25,7 @@
{% endspaceless %}{% endblock %}</title>
{% block stylesheets %}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sph_theme/css/sph_theme.css" />
+ <link rel="stylesheet" href="{{ STATIC_URL }}sph_theme/css/sph_theme.css" />
{% endblock %}
{% for styleinclude in sph_settings.community_styleincludes %}
<link rel="stylesheet" href="{{ styleinclude }}" />
@@ -42,7 +42,7 @@
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = '/media/'
+STATIC_URL = '/media/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
@@ -39,7 +39,7 @@
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
-MEDIA_URL = '/static/'
+STATIC_URL = '/static/'
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
@@ -14,8 +14,8 @@ class PermissionDenied(Exception):
from django.utils.translation import ugettext as _
jsincludes = get_sph_setting( 'community_jsincludes', [])
-jsincludes.append(settings.MEDIA_URL + 'sphene/community/jquery-1.2.3.min.js')
-jsincludes.append(settings.MEDIA_URL + 'sphene/community/jquery.autocomplete.js')
+jsincludes.append(settings.STATIC_URL + 'sphene/community/jquery-1.2.3.min.js')
+jsincludes.append(settings.STATIC_URL + 'sphene/community/jquery.autocomplete.js')
sphsettings.set_sph_setting( 'community_jsincludes', jsincludes )
@@ -10,7 +10,7 @@
'django096compatibility': False,
- 'community_avatar_default': settings.MEDIA_URL + 'sphene/community/default_avatar.png',
+ 'community_avatar_default': settings.STATIC_URL + 'sphene/community/default_avatar.png',
'community_avatar_default_width': 48,
'community_avatar_default_height': 48,
'community_avatar_max_width': 150,
@@ -268,7 +268,7 @@ def include_js(jspath, prefix = None):
return
if prefix is None:
- prefix = settings.MEDIA_URL
+ prefix = settings.STATIC_URL
jsincludes.append(prefix + jspath)
sphsettings.set_sph_setting( 'community_jsincludes', jsincludes )
@@ -281,7 +281,7 @@ def include_css(csspath, prefix = None):
return
if prefix is None:
- prefix = settings.MEDIA_URL
+ prefix = settings.STATIC_URL
styleincludes.append(prefix + csspath)
sphsettings.set_sph_setting( 'community_styleincludes', styleincludes )
@@ -2,7 +2,7 @@
{% block head %}
{{ block.super }}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sphene/community/styles/base.css" />
+ <link rel="stylesheet" href="{{ STATIC_URL }}sphene/community/styles/base.css" />
{% if sph.rss %}
{% for rss in sph.rss %}
<link rel="alternate" title="{{ rss.label }}" href="{{ rss.url }}" type="application/rss+xml">
@@ -5,7 +5,7 @@
{% block head %}
{{ block.super }}
- <script type="text/javascript" src="{{ MEDIA_URL }}sphene/community/jquery-1.2.3.min.js"></script>
+ <script type="text/javascript" src="{{ STATIC_URL }}sphene/community/jquery-1.2.3.min.js"></script>
<script type="text/javascript">
@@ -137,7 +137,7 @@ def handleMacroCall(self, doc, params):
url = categoryObj.get_absolute_url_rss_latest_threads()
add_rss_feed( url, 'RSS Feed of latest threads' )
- return HTML( '<a href="%(url)s"><img src="%(media_url)ssphene/community/icons/feed-icon-14x14.png" border="0" alt="RSS Feed of latest threads" title="RSS Feed of latest threads" /></a>' % { 'url': url, 'media_url': settings.MEDIA_URL } )
+ return HTML( '<a href="%(url)s"><img src="%(media_url)ssphene/community/icons/feed-icon-14x14.png" border="0" alt="RSS Feed of latest threads" title="RSS Feed of latest threads" /></a>' % { 'url': url, 'media_url': settings.STATIC_URL } )
@register.filter
@@ -391,7 +391,7 @@ def resize(file, size='200x200'):
basename, format = file.name.rsplit('.', 1)
miniature = basename + '_' + size + '.thumb.' + format
miniature_filename = os.path.join(settings.MEDIA_ROOT, miniature)
- miniature_url = os.path.join(settings.MEDIA_URL, miniature)
+ miniature_url = os.path.join(settings.STATIC_URL, miniature)
image = Image.open(file)
@@ -43,7 +43,7 @@ def render(self, name, value, attrs=None):
}
//-->
</script>""" % { 'name': name,
- 'media_url': settings.MEDIA_URL,
+ 'media_url': settings.STATIC_URL,
'content_type_id': self.content_type_id,
'url': sph_reverse( 'sph_tags_json_autocompletion', (), {} ), };
@@ -6,12 +6,12 @@
jsincludes = get_sph_setting( 'community_jsincludes', [])
# jquery is already added by the community application.
-#jsincludes.append(settings.MEDIA_URL + 'sphene/community/jquery-1.2.3.min.js')
-jsincludes.append(settings.MEDIA_URL + 'sphene/community/jquery.dimensions.js')
-jsincludes.append(settings.MEDIA_URL + 'sphene/community/ui.mouse.js')
-#jsincludes.append(settings.MEDIA_URL + 'sphene/community/ui.draggable.js')
-jsincludes.append(settings.MEDIA_URL + 'sphene/community/ui.droppable.js')
-jsincludes.append(settings.MEDIA_URL + 'sphene/community/ui.sortable.js')
-jsincludes.append(settings.MEDIA_URL + 'sphene/sphblockframework/blocksorting.js')
+#jsincludes.append(settings.STATIC_URL + 'sphene/community/jquery-1.2.3.min.js')
+jsincludes.append(settings.STATIC_URL + 'sphene/community/jquery.dimensions.js')
+jsincludes.append(settings.STATIC_URL + 'sphene/community/ui.mouse.js')
+#jsincludes.append(settings.STATIC_URL + 'sphene/community/ui.draggable.js')
+jsincludes.append(settings.STATIC_URL + 'sphene/community/ui.droppable.js')
+jsincludes.append(settings.STATIC_URL + 'sphene/community/ui.sortable.js')
+jsincludes.append(settings.STATIC_URL + 'sphene/sphblockframework/blocksorting.js')
sphsettings.set_sph_setting( 'community_jsincludes', jsincludes )
@@ -2,5 +2,5 @@
{% block stylesheets %}
{{ block.super }}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sphene/sphblog/styles/base.css" />
+ <link rel="stylesheet" href="{{ STATIC_URL }}sphene/sphblog/styles/base.css" />
{% endblock %}
@@ -7,7 +7,7 @@
{% block stylesheets %}
{{ block.super }}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sphene/sphblog/styles/base.css" />
+ <link rel="stylesheet" href="{{ STATIC_URL }}sphene/sphblog/styles/base.css" />
{% endblock %}
{% block sphboard_breadcrumb %}
@@ -45,7 +45,7 @@
# sph extended BBCODE wiki label.
'board_auto_wiki_link_enabled': True,
# default location of emoticons
- 'board_emoticons_root': settings.MEDIA_URL + 'sphene/emoticons/',
+ 'board_emoticons_root': settings.STATIC_URL + 'sphene/emoticons/',
'board_emoticons_list': {
'0:-)': 'angel.gif',
'O:-)':'angel.gif',
@@ -124,5 +124,5 @@
styleincludes = sphsettings.get_sph_setting( 'community_styleincludes', [])
-styleincludes.append(settings.MEDIA_URL + 'sphene/sphboard/styles/base.css')
+styleincludes.append(settings.STATIC_URL + 'sphene/sphboard/styles/base.css')
sphsettings.set_sph_setting( 'community_styleincludes', styleincludes )
@@ -15,8 +15,8 @@ def makelink(object, column, value):
class NewPostIndicator(objlist.Column):
def _get_value(self, object):
- # {{ MEDIA_URL }}sphene/sphboard/icons/{% if thread.has_new_posts %}new{% endif %}folder.gif" width='16px' height='16px' title='Heat: {{ thread.heat }}' /></td
- return mark_safe( '<img src="%ssphene/sphboard/icons/%sfolder.gif" width="16px" height="16px" />' % (settings.MEDIA_URL, object.has_new_posts() and 'new' or '' ) )
+ # {{ STATIC_URL }}sphene/sphboard/icons/{% if thread.has_new_posts %}new{% endif %}folder.gif" width='16px' height='16px' title='Heat: {{ thread.heat }}' /></td
+ return mark_safe( '<img src="%ssphene/sphboard/icons/%sfolder.gif" width="16px" height="16px" />' % (settings.STATIC_URL, object.has_new_posts() and 'new' or '' ) )
class ThreadList(objlist.AdvancedObjectList):
@@ -6,7 +6,7 @@
{% for test in level|sphrange %}
<td width='5px'>&nbsp;</td>
{% endfor %}
- <td width="20px"><img src="{{ MEDIA_URL }}sphene/sphboard/icons/{% if category.has_new_posts %}new{% endif %}folder.gif" width='16px' height='16px' /></td>
+ <td width="20px"><img src="{{ STATIC_URL }}sphene/sphboard/icons/{% if category.has_new_posts %}new{% endif %}folder.gif" width='16px' height='16px' /></td>
{% ifequal category.category_type "sphseparator" %}
<td class="sphboard_categoryname" colspan="{{ maxDepth|sphminus:level|sph_plus:3 }}"><a href="{{ category.get_absolute_url }}">{{ category.name }}</a></td>
{% else %}
@@ -2,10 +2,10 @@
{% load sph_extras %}
{% load sphboard_extras %}
{% if bbcodewysiwyg %}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sphene/sphboard/styles/editor.css" />
- <script type="text/javascript" src="{{ MEDIA_URL }}sphene/sphboard/js/editor.js"></script>
+ <link rel="stylesheet" href="{{ STATIC_URL }}sphene/sphboard/styles/editor.css" />
+ <script type="text/javascript" src="{{ STATIC_URL }}sphene/sphboard/js/editor.js"></script>
{% endif %}
- <script language="JavaScript" type="text/javascript" src="{{ MEDIA_URL }}sphene/community/xmlhttp.js"></script>
+ <script language="JavaScript" type="text/javascript" src="{{ STATIC_URL }}sphene/community/xmlhttp.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function doPreview() {
@@ -34,9 +34,9 @@
{{ form }}
{% if bbcodewysiwyg %}
<script type="text/javascript">
- var editor_static = "{{ MEDIA_URL }}sphene/sphboard";
+ var editor_static = "{{ STATIC_URL }}sphene/sphboard";
</script>
- <script type="text/javascript" src="{{ MEDIA_URL }}sphene/sphboard/js/inline.js"></script>
+ <script type="text/javascript" src="{{ STATIC_URL }}sphene/sphboard/js/inline.js"></script>
{% endif %}
</table>
</script>
@@ -6,7 +6,7 @@
{% block head %}
{{ block.super }}
- <script type="text/javascript" src="{{ MEDIA_URL }}sphene/community/jquery-1.2.3.min.js"></script>
+ <script type="text/javascript" src="{{ STATIC_URL }}sphene/community/jquery-1.2.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
@@ -2,5 +2,5 @@
{% block head %}
{{ block.super }}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sphene/sphboard/styles/base.css" />
+ <link rel="stylesheet" href="{{ STATIC_URL }}sphene/sphboard/styles/base.css" />
{% endblock %}
@@ -66,7 +66,7 @@
{% endblock thread_list_header %}
{% for thread in thread_list %}
<tr>
- <td width="20px"><img src="{{ MEDIA_URL }}sphene/sphboard/icons/{% if thread.has_new_posts %}new{% endif %}folder.gif" width='16px' height='16px' title='Heat: {{ thread.heat }}' /></td>
+ <td width="20px"><img src="{{ STATIC_URL }}sphene/sphboard/icons/{% if thread.has_new_posts %}new{% endif %}folder.gif" width='16px' height='16px' title='Heat: {{ thread.heat }}' /></td>
{% if thread.is_moved %}
<td colspan="4"><small>
{% blocktrans with thread.get_absolute_url as th_url and thread.subject as th_subject and thread.root_post.category.get_absolute_url as cat_url and thread.root_post.category.name as cat_name %}Thread was moved: <a href="{{ th_url }}">{{ th_subject }}</a> into <a href="{{ cat_url }}">{{ cat_name }}</a>.{% endblocktrans %}
@@ -6,12 +6,12 @@
<div class="sphquestions_answer">
{% if votecount %}
<div>
- <img src="{{ MEDIA_URL }}sphene/sphquestions/icons/answered.png" width="16px" height="16px" /> This answers the question. (Voted by <strong>{{ votecount }} users</strong>{% if authorvoted %} including the author of the question{% endif %}.)
+ <img src="{{ STATIC_URL }}sphene/sphquestions/icons/answered.png" width="16px" height="16px" /> This answers the question. (Voted by <strong>{{ votecount }} users</strong>{% if authorvoted %} including the author of the question{% endif %}.)
</div>
{% endif %}
{% if allowvoting %}
<div>
- <img src="{{ MEDIA_URL }}sphene/sphquestions/icons/question_blue.png" width="16px" height="16px" /> Did this reply answer the question ? <a href="{% sph_url2 sphquestions_votereply reply_id=post.id %}">Yes</a>
+ <img src="{{ STATIC_URL }}sphene/sphquestions/icons/question_blue.png" width="16px" height="16px" /> Did this reply answer the question ? <a href="{% sph_url2 sphquestions_votereply reply_id=post.id %}">Yes</a>
</div>
{% endif %}
</div>
@@ -27,12 +27,12 @@
{% if qext.is_question %}
{% if qext.answered %}
{% ifequal qext.answered 3 %}
- <img src="{{ MEDIA_URL }}sphene/sphquestions/icons/answered.png" width="16px" height="16px" alt="Answered (Voted by the author)" title="Answered (Voted by the author)" class="sphquestion" />
+ <img src="{{ STATIC_URL }}sphene/sphquestions/icons/answered.png" width="16px" height="16px" alt="Answered (Voted by the author)" title="Answered (Voted by the author)" class="sphquestion" />
{% else %}
- <img src="{{ MEDIA_URL }}sphene/sphquestions/icons/voted_answered.png" width="16px" height="16px" alt="Answered (Voted by a user)" title="Answered (Voted by a user)" class="sphquestion" />
+ <img src="{{ STATIC_URL }}sphene/sphquestions/icons/voted_answered.png" width="16px" height="16px" alt="Answered (Voted by a user)" title="Answered (Voted by a user)" class="sphquestion" />
{% endifequal %}
{% else %}
- <img src="{{ MEDIA_URL }}sphene/sphquestions/icons/question_blue.png" width="16px" height="16px" alt="Unanswered question" title="Unanswered question" class="sphquestion" />
+ <img src="{{ STATIC_URL }}sphene/sphquestions/icons/question_blue.png" width="16px" height="16px" alt="Unanswered question" title="Unanswered question" class="sphquestion" />
{% endif %}
{% endif %}
{% endwith %}
@@ -43,8 +43,8 @@
{% block below_thread_list %}
<ul class="sphquestions_icons">
- <li><img src="{{ MEDIA_URL }}sphene/sphquestions/icons/answered.png" width="16px" height="16px" alt="Answered (Voted by the author)" title="Answered (Voted by the author)" /> Answered question (Voted by the author of the question)</li>
- <li><img src="{{ MEDIA_URL }}sphene/sphquestions/icons/voted_answered.png" width="16px" height="16px" alt="Answered (Voted by a user)" title="Answered (Voted by a user)" /> Answered question (Voted by another user but not by the author)</li>
- <li> <img src="{{ MEDIA_URL }}sphene/sphquestions/icons/question_blue.png" width="16px" height="16px" alt="Unanswered question" title="Unanswered question" /> Unanswered question.</li>
+ <li><img src="{{ STATIC_URL }}sphene/sphquestions/icons/answered.png" width="16px" height="16px" alt="Answered (Voted by the author)" title="Answered (Voted by the author)" /> Answered question (Voted by the author of the question)</li>
+ <li><img src="{{ STATIC_URL }}sphene/sphquestions/icons/voted_answered.png" width="16px" height="16px" alt="Answered (Voted by a user)" title="Answered (Voted by a user)" /> Answered question (Voted by another user but not by the author)</li>
+ <li> <img src="{{ STATIC_URL }}sphene/sphquestions/icons/question_blue.png" width="16px" height="16px" alt="Unanswered question" title="Unanswered question" /> Unanswered question.</li>
</ul>
{% endblock %}
@@ -44,7 +44,7 @@ def sphquestions_answervoting(qext, reply):
'uservoted' : uservoted,
'authorvoted': authorvoted,
'votecount' : len(votes),
- 'MEDIA_URL' : settings.STATIC_URL,
+ 'STATIC_URL' : settings.STATIC_URL,
'allowvoting': allowvoting,
}
@@ -2,5 +2,5 @@
{% block head %}
{{ block.super }}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sphene/sphsearch/styles/searchbase.css" />
+ <link rel="stylesheet" href="{{ STATIC_URL }}sphene/sphsearch/styles/searchbase.css" />
{% endblock %}
@@ -93,7 +93,7 @@ def pdf_generate(self):
static_filepath = settings.MEDIA_ROOT
snip_rendered_body = snip_rendered_body.replace(
'<img src="%(media_url)s' % \
- { 'media_url': settings.MEDIA_URL },
+ { 'media_url': settings.STATIC_URL },
'<img src="%s/' % static_filepath )
import codecs
xmlout = codecs.open(xmlfile, mode='w', encoding='utf-8')
@@ -2,5 +2,5 @@
{% block head %}
{{ block.super }}
- <link rel="stylesheet" href="{{ MEDIA_URL }}sphene/sphwiki/styles/base.css" />
+ <link rel="stylesheet" href="{{ STATIC_URL }}sphene/sphwiki/styles/base.css" />
{% endblock %}
@@ -4,7 +4,7 @@
{% load sph_extras %}
{% block content %}
- <script language="JavaScript" type="text/javascript" src="{{ MEDIA_URL }}sphene/community/xmlhttp.js"></script>
+ <script language="JavaScript" type="text/javascript" src="{{ STATIC_URL }}sphene/community/xmlhttp.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function doPreview() {
@@ -29,7 +29,7 @@
{% for attachment in object_list %}
<tr>
<td>{{ attachment.id }}</td>
- <td><a href="{{ attachment.get_absolute_editurl }}?delete=1" onClick="return verifyDelete('{{ attachment.fileupload.name|sph_basename }}')"><img src="{{ MEDIA_URL}}sphene/sphwiki/icons/edit-delete.png" alt="{% trans 'Delete'%}" title="{% trans 'Delete' %}" border="0" /></a></td>
+ <td><a href="{{ attachment.get_absolute_editurl }}?delete=1" onClick="return verifyDelete('{{ attachment.fileupload.name|sph_basename }}')"><img src="{{ STATIC_URL}}sphene/sphwiki/icons/edit-delete.png" alt="{% trans 'Delete'%}" title="{% trans 'Delete' %}" border="0" /></a></td>
<td><a href="{{ attachment.fileupload.url }}">{{ attachment.fileupload.name|sph_basename }}</a></td>
<td>{{ attachment.uploaded|sph_date }}</td>
<td>{% sph_html_user attachment.uploader %}</td>

0 comments on commit 0819350

Please sign in to comment.