Permalink
Browse files

fixes to make admin controller work with mako (much faster!)

  • Loading branch information...
1 parent eedbe0d commit 44a8134ea7e1e0ca83fcfc2da9382056f4aeb0ce percious17 committed Apr 26, 2009
Showing with 18 additions and 9,256 deletions.
  1. +0 −9,255 docs/class_diagram.graffle
  2. +1 −1 tgext/admin/controller.py
  3. +17 −0 tgext/admin/templates/index.mak
View
9,255 docs/class_diagram.graffle
0 additions, 9,255 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 tgext/admin/controller.py
@@ -48,7 +48,7 @@ def __init__(self, models, session, config_type=None, translations=None):
self.default_index_template = self.config.default_index_template
@with_trailing_slash
- @expose(engine+':tgext.admin.templates.index')
+ @expose('tgext.admin.templates.index')
def index(self):
#overrides the template for this method
original_index_template = self.index.decoration.engines['text/html']
View
17 tgext/admin/templates/index.mak
@@ -0,0 +1,17 @@
+<%inherit file="local:templates.master"/>
+
+<%def name="title()">
+<title>Turbogears Administration System</title>
+</%def>
+
+<%def name="content()">
+ <div style="height:0px;"> &nbsp; </div>
+ <h2>TurboGears Admin</h2>
+ This is a fully-configurable administrative tool to help you administer your website.
+
+ <ul>
+ % for model in models:
+ <li><a href='${model.lower()}s/'>${model}s</a></li>
+ % endfor
+ </ul>
+</%def>

0 comments on commit 44a8134

Please sign in to comment.