diff piecrust/admin/templates/layouts/default.html @ 961:b1a00c2c0c7f

admin: Use URL routes for static assets. This removes the need for `base_url` and other workarounds for when the admin panel is under a sub-folder.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 07 Oct 2017 12:16:04 -0700
parents 2b0fa2e4c12f
children
line wrap: on
line diff
--- a/piecrust/admin/templates/layouts/default.html	Sat Oct 07 12:13:57 2017 -0700
+++ b/piecrust/admin/templates/layouts/default.html	Sat Oct 07 12:16:04 2017 -0700
@@ -8,7 +8,7 @@
 </div>
 <nav class="ft-nav">
     <div class="ft-nav-title">
-        <img src="{{base_url}}/static/img/foodtruck.png" alt="Food Truck" />
+        <img src="{{url_for('.static', filename='img/foodtruck.png')}}" alt="Food Truck" />
         <div class="ft-nav-brand">FoodTruck</div>
     </div>
     {% include 'layouts/menu.html' %}