Skip to content

Commit c218f23

Browse files
committed
Removed static file finding utilities in theme inheritance, since this doesn't work on prod.
1 parent 4c9189a commit c218f23

File tree

8 files changed

+12
-56
lines changed

8 files changed

+12
-56
lines changed

main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
# Import custom django libraries
4040
webapp.template.register_template_library('utils.django_libs.gravatar')
4141
webapp.template.register_template_library('utils.django_libs.description')
42-
webapp.template.register_template_library('utils.django_libs.find_static')
4342

4443
# Log a message each time this module get loaded.
4544
logging.info('Loading %s, app version = %s',

utils/django_libs/find_static.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

utils/template.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ class below because Django requires you to load the template with a method
101101
directory, file_name = os.path.split(abspath)
102102
if directory:
103103
template_dirs = [directory] + template_dirs
104-
logging.warn(template_dirs, file_name)
105104
new_settings = {
106105
'TEMPLATE_DIRS': template_dirs,
107106
'TEMPLATE_DEBUG': debug,

view.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def build_tree(base):
5252
do_build_tree(basedir, theme, tree)
5353
return tree
5454
templates = build_tree('views')
55-
staticfiles = build_tree('static')
5655

5756
def find_file(tree, path):
5857
cur = tree

views/default/bloog/base.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta http-equiv="Content-Type" content="{{ blog.html_type }}; charset={{ blog.charset }}" />
55
<title> {{ title }}</title>
66
<meta name="generator" content="Bloog {{ bloog_version }}" />
7-
<link rel="stylesheet" href="{{"style.css"|find_static_file}}" type="text/css" media="screen" />
7+
<link rel="stylesheet" href="/static/default/style.css" type="text/css" media="screen" />
88
<link rel="alternate" type="application/rss+xml" title="{{ blog.title }} RSS Feed"
99
href="{{ blog.root_url }}{{ blog.master_atom_url }}" />
1010
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/assets/skins/sam/skin.css" />
@@ -18,7 +18,7 @@
1818
<div id="masthead" class="fix">
1919
<h1><a href="/">{{ blog.title }}</a></h1>
2020
<div id="authorBlurb">
21-
<img src="{{"images/avatar.png"|find_static_file}}" alt="Avatar" />
21+
<img src="/static/default/images/avatar.png" alt="Avatar" />
2222
<p id="authorIntro">
2323
{{ blog.description }}
2424
</p>
@@ -89,7 +89,7 @@ <h1><a href="/">{{ blog.title }}</a></h1>
8989
<div id="searchWrap">
9090
<form method="get" id="searchForm" action="/search">
9191
<input type="text" value="{{ searchterm }}" name="s" id="s" />
92-
<input id="searchsubmit" type="image" src="{{"images/btn_search.gif"|find_static_file}}" alt="Search" />
92+
<input id="searchsubmit" type="image" src="/static/default/images/btn_search.gif" alt="Search" />
9393
</form>
9494
</div>
9595
{% endblock %}
@@ -254,7 +254,7 @@ <h3>Subscribe</h3>
254254
</div>
255255

256256
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script>
257-
<script type="text/javascript" src="{{"js/bloog_base.js"|find_static_file}}"></script>
257+
<script type="text/javascript" src="/static/default/js/bloog_base.js"></script>
258258

259259
{% if user_is_admin %}
260260
{% include "form_editor.html" %}

views/default/bloog/blog/form_comment.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
{% if not user_is_admin %}
3838
<!-- Load scripts if not already loaded due to admin interface -->
3939
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.5.2/build/yahoo-dom-event/yahoo-dom-event.js&2.5.2/build/animation/animation-min.js&2.5.2/build/connection/connection-min.js&2.5.2/build/container/container-min.js&2.5.2/build/menu/menu-min.js&2.5.2/build/element/element-beta-min.js&2.5.2/build/button/button-min.js&2.5.2/build/editor/editor-beta-min.js&2.5.2/build/selector/selector-beta-min.js"></script>
40-
<script type="text/javascript" src="{{"js/ojay/js-class.js"|find_static_file}}"></script>
41-
<script type="text/javascript" src="{{"js/ojay/core.js"|find_static_file}}"></script>
40+
<script type="text/javascript" src="/static/default/js/ojay/js-class.js"></script>
41+
<script type="text/javascript" src="/static/default/js/ojay/core.js"></script>
4242
{% endif %}
43-
<script type="text/javascript" src="{{"js/bloog_comments.js"|find_static_file}}"></script>
43+
<script type="text/javascript" src="/static/default/js/bloog_comments.js"></script>
4444

views/default/bloog/contact/contact.get.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>Contact Me</h2>
2121
<p><input type="text" id="subject" name="subject" size="22" tabindex="3" />
2222
<label for="subject"><small>Subject</small></label></p>
2323
<p><textarea id="message" name="message" cols="60" rows="10" tabindex="4">Please enter a message.</textarea></p>
24-
<p><input name="submit" type="image" src="{{"images/btn_submit.gif"|find_static_file}}" alt="Submit" id="submit" tabindex="5" value="Submit" /></p>
24+
<p><input name="submit" type="image" src="/static/default/images/btn_submit.gif" alt="Submit" id="submit" tabindex="5" value="Submit" /></p>
2525
<input type="hidden" name="token" value="{{ token }}" />
2626
<input type="hidden" name="curtime" value="{{ curtime|floatformat }}" />
2727
</form>

views/default/bloog/form_editor.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% if user_is_admin %}
22

33
{% block head %}
4-
<link rel="stylesheet" type="text/css" href="{{"editor.css"|find_static_file}}" />
4+
<link rel="stylesheet" type="text/css" href="/static/default/editor.css" />
55
{% endblock %}
66

77
<div id="postDialog" class="popupDialog">
@@ -27,9 +27,9 @@
2727
</div>
2828

2929
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.5.2/build/yahoo-dom-event/yahoo-dom-event.js&2.5.2/build/animation/animation-min.js&2.5.2/build/connection/connection-min.js&2.5.2/build/container/container-min.js&2.5.2/build/menu/menu-min.js&2.5.2/build/element/element-beta-min.js&2.5.2/build/button/button-min.js&2.5.2/build/editor/editor-beta-min.js&2.5.2/build/selector/selector-beta-min.js"></script>
30-
<script type="text/javascript" src="{{"js/ojay/js-class.js"|find_static_file}}"></script>
31-
<script type="text/javascript" src="{{"js/ojay/core.js"|find_static_file}}""></script>
32-
<script type="text/javascript" src="{{"js/bloog_admin.js"|find_static_file}}"></script>
30+
<script type="text/javascript" src="/static/default/js/ojay/js-class.js"></script>
31+
<script type="text/javascript" src="/static/default/js/ojay/core.js"></script>
32+
<script type="text/javascript" src="/static/default/js/bloog_admin.js"></script>
3333

3434
{% endif %}
3535

0 commit comments

Comments
 (0)