This repository has been archived by the owner. It is now read-only.
Please sign in to comment.
Added support for theme inheritance.
Themes are now specified as an array rather than a single element. Files are looked for in templates (and static directories) in the order they are listed. This way, it is possible to define a new theme that makes only minor modifications of the default theme without copying all the files.
- Loading branch information...
Showing with 107 additions and 33 deletions.
- +1 −1 config.py
- +2 −1 handlers/bloog/blog.py
- +1 −0 main.py
- +41 −0 utils/django_libs/find_static.py
- +6 −2 utils/template.py
- +44 −17 view.py
- +4 −4 views/default/bloog/base.html
- +3 −3 views/default/bloog/blog/form_comment.html
- +1 −1 views/default/bloog/contact/contact.get.html
- +4 −4 views/default/bloog/form_editor.html
|@@ -0,0 +1,41 @@|
|+# The MIT License|
|+# Copyright (c) 2008 Nick Johnson|
|+# Permission is hereby granted, free of charge, to any person obtaining a copy|
|+# of this software and associated documentation files (the "Software"), to|
|+# deal in the Software without restriction, including without limitation|
|+# the rights to use, copy, modify, merge, publish, distribute, sublicense,|
|+# and/or sell copies of the Software, and to permit persons to whom the|
|+# Software is furnished to do so, subject to the following conditions:|
|+# The above copyright notice and this permission notice shall be included in|
|+# all copies or substantial portions of the Software.|
|+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR|
|+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,|
|+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE|
|+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER|
|+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING|
|+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER|
|+# DEALINGS IN THE SOFTWARE.|
|+Utility function to get the path of a static file.|
|+__author__ = 'Nick Johnson'|
|+from google.appengine.ext import webapp|
|+register = webapp.template.create_template_register()|
|+ static_path = view.find_file(view.staticfiles, path)|
|+ if static_path:|
|+ return "/" + os.path.join("static", static_path)|
|+ return ""|