summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-04-07 12:48:03 +0200
committerGuillaume Seguin <guillaume@segu.in>2008-04-07 12:48:03 +0200
commit6cb8999c2bdd24e57b88293d26c6be1f6e3d1d7a (patch)
treec691724ad654bc8bae8a9968d062112af57d60d6
parenta777e1bfa975125c9bac8f8c1940a03c29bf18c1 (diff)
downloadmarks-6cb8999c2bdd24e57b88293d26c6be1f6e3d1d7a.tar.gz
marks-6cb8999c2bdd24e57b88293d26c6be1f6e3d1d7a.tar.bz2
* Move header contents to the actual template
-rw-r--r--main/shared.py9
-rw-r--r--templates/main/base.html5
2 files changed, 4 insertions, 10 deletions
diff --git a/main/shared.py b/main/shared.py
index 6be5645..4808071 100644
--- a/main/shared.py
+++ b/main/shared.py
@@ -45,14 +45,6 @@ def reset_user_data (request):
if "user_data" in request.session:
del request.session["user_data"]
-def get_header (request):
- '''Get the header'''
- header = '''<strong>Marks</strong>, a \
-<a href="http://shound.org/">Shound.org</a> software, available under \
-<a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">\
-Affero GPL v3</a>.'''
- return header
-
def render_template (request, data, template = "main/base.html"):
'''Helper rendering function'''
template = loader.get_template (template)
@@ -61,7 +53,6 @@ def render_template (request, data, template = "main/base.html"):
def render_page (request, data, template = "main/base.html"):
'''Helper rendering function'''
- data["header"] = get_header (request)
return HttpResponse (render_template (request, data, template))
def redirect (request, to, message, delay = 2000):
diff --git a/templates/main/base.html b/templates/main/base.html
index 94189b5..493596a 100644
--- a/templates/main/base.html
+++ b/templates/main/base.html
@@ -3,7 +3,10 @@
{% block page %}
<div id="header">
- {{ header|safe }}
+ <strong><a href="{% url marks.main.home_view %}">Marks</a></strong>, a
+<a href="http://shound.org/">Shound.org</a> software, available under
+<a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">
+Affero GPL v3</a>.
</div>
<div class="spacer"></div>
<div id="main">