Merge lp:~mhall119/ubuntu-community-webthemes/default-to-static into lp:ubuntu-community-webthemes/light-django-theme

Proposed by Michael Hall
Status: Merged
Merged at revision: 49
Proposed branch: lp:~mhall119/ubuntu-community-webthemes/default-to-static
Merge into: lp:ubuntu-community-webthemes/light-django-theme
Diff against target: 71 lines (+15/-15)
1 file modified
templates/website_base.html (+15/-15)
To merge this branch: bzr merge lp:~mhall119/ubuntu-community-webthemes/default-to-static
Reviewer Review Type Date Requested Status
Ubuntu Community Web Themes Developers Pending
Review via email: mp+125305@code.launchpad.net

Description of the change

Adds a symlink from ./media to ./static/ubuntu_website so that media files will be caught by collectstatic

Default ubuntu_website_media to use /static/ubuntu_website/ so that newer versions of Django which support collectstatic won't need to install a context processor

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'static'
=== added symlink 'static/ubuntu_website'
=== target is u'../media/'
=== modified file 'templates/website_base.html'
--- templates/website_base.html 2012-04-04 13:15:21 +0000
+++ templates/website_base.html 2012-09-19 18:49:21 +0000
@@ -7,22 +7,22 @@
7 {% block extrameta %}{% endblock %}7 {% block extrameta %}{% endblock %}
8 <title>{% block title %}Ubuntu Website{% endblock %}</title>8 <title>{% block title %}Ubuntu Website{% endblock %}</title>
99
10 {% block defaultstyles %}<link rel="shortcut icon" href="{{ubuntu_website_media}}/images/favicon.ico" type="image/x-icon" />10 {% block defaultstyles %}<link rel="shortcut icon" href="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/images/favicon.ico" type="image/x-icon" />
11 <link rel="stylesheet" type="text/css" media="all" href="//fonts.googleapis.com/css?family=Ubuntu" />11 <link rel="stylesheet" type="text/css" media="all" href="//fonts.googleapis.com/css?family=Ubuntu" />
12 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-reset.css" />12 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/css/core-reset.css" />
13 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core-grid.css" />13 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/css/core-grid.css" />
14 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/core.css" />14 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/css/core.css" />
15 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media}}/css/extra_styles.css" />{% endblock %}15 <link rel="stylesheet" type="text/css" href="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/css/extra_styles.css" />{% endblock %}
16 {%block extrastyles %}{% endblock %}16 {%block extrastyles %}{% endblock %}
1717
18 {% block defaultheadjs %}<script src="{{ubuntu_website_media}}/js/modernizr.min.js"></script>18 {% block defaultheadjs %}<script src="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/js/modernizr.min.js"></script>
19 <script src="//code.jquery.com/jquery-1.7.2.min.js"></script>19 <script src="//code.jquery.com/jquery-1.7.2.min.js"></script>
20 <script>window.jQuery || document.write('<script src="{{ubuntu_website_media}}/js/jquery-1.7.2.min.js"><\/script>')</script>20 <script>window.jQuery || document.write('<script src="{{ubuntu_website_medi|default:'/static/ubuntu_website'}}/js/jquery-1.7.2.min.js"><\/script>')</script>
21 <script>var website_assets="{{ubuntu_website_media}}";</script>{% endblock %}21 <script>var website_assets="{{ubuntu_website_media|default:'/static/ubuntu_website'}}";</script>{% endblock %}
22 <!--block extraheadjs left out by design, add other JS files to the loader.js script for async loading,22 <!--block extraheadjs left out by design, add other JS files to the loader.js script for async loading,
23 this is done and by design, if you MUST add a <script> tag do so in the closure block and test to ensure23 this is done and by design, if you MUST add a <script> tag do so in the closure block and test to ensure
24 no breakage has been caused, also avoid inline CSS and JS when possible, use {{ubuntu_website_media}}/css/site.css24 no breakage has been caused, also avoid inline CSS and JS when possible, use {{ubuntu_website_media|default:'/static/ubuntu_website'}}/css/site.css
25 or {{ubuntu_website_media}}/js/site.js so it correct headers are sent and can be cached properly by broswers-->25 or {{ubuntu_website_media|default:'/static/ubuntu_website'}}/js/site.js so it correct headers are sent and can be cached properly by broswers-->
26 {% endblock %}{% block extrahead %}{% endblock %}26 {% endblock %}{% block extrahead %}{% endblock %}
27</head>27</head>
28<body>28<body>
@@ -60,7 +60,7 @@
60 {% endblock %}60 {% endblock %}
61 </nav>61 </nav>
62 <a class="logo-ubuntu" href="{% block logo_href %}/{% endblock %}">62 <a class="logo-ubuntu" href="{% block logo_href %}/{% endblock %}">
63 <img width="118" height="27" src="{{ubuntu_website_media}}/images/logo-header.png" alt="Ubuntu logo"/>63 <img width="118" height="27" src="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/images/logo-header.png" alt="Ubuntu logo"/>
64 </a>64 </a>
65 <h2 class="header-text"><a href="{% block logo_text_href %}/{% endblock %}">{% block logo_text %}Country Loco Team{% endblock %}</a></h2>65 <h2 class="header-text"><a href="{% block logo_text_href %}/{% endblock %}">{% block logo_text %}Country Loco Team{% endblock %}</a></h2>
66 </header>66 </header>
@@ -103,7 +103,7 @@
103 <footer class="clear">103 <footer class="clear">
104 <div class="container">104 <div class="container">
105 <a class="logo-ubuntu" href="/">105 <a class="logo-ubuntu" href="/">
106 <img width="118" height="27" src="{{ubuntu_website_media}}/images/logo-footer.png" alt="Ubuntu logo"/>106 <img width="118" height="27" src="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/images/logo-footer.png" alt="Ubuntu logo"/>
107 </a>107 </a>
108108
109 {% block footer %}109 {% block footer %}
@@ -190,10 +190,10 @@
190 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);190 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
191 })();191 })();
192 </script>192 </script>
193 <script src="{{ubuntu_website_media}}/js/loader.js"></script>193 <script src="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/js/loader.js"></script>
194 <!--[if lt IE 9]>194 <!--[if lt IE 9]>
195 <script src="{{ubuntu_website_media}}/js/polyfills/IE9/IE9.js">IE7_PNG_SUFFIX=".png";</script>195 <script src="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/js/polyfills/IE9/IE9.js">IE7_PNG_SUFFIX=".png";</script>
196 <script src="{{ubuntu_website_media}}/js/polyfills/IE9/squish.js"></script>196 <script src="{{ubuntu_website_media|default:'/static/ubuntu_website'}}/js/polyfills/IE9/squish.js"></script>
197 <![endif]-->197 <![endif]-->
198 {% block closure %}{% endblock %}198 {% block closure %}{% endblock %}
199</div>199</div>

Subscribers

People subscribed via source and target branches