Merge lp:~devcamcar/django-nova/lp711010 into lp:django-nova

Proposed by Devin Carlen
Status: Superseded
Proposed branch: lp:~devcamcar/django-nova/lp711010
Merge into: lp:django-nova
Diff against target: 62 lines (+42/-1)
2 files modified
src/django_nova/templates/django_nova/credentials/expired.html (+5/-1)
src/django_nova/templatetags/django_nova_tags.py (+37/-0)
To merge this branch: bzr merge lp:~devcamcar/django-nova/lp711010
Reviewer Review Type Date Requested Status
Ken Pepple (community) Approve
Devin Carlen Pending
Review via email: mp+48097@code.launchpad.net

This proposal has been superseded by a proposal from 2011-02-01.

Commit message

Implemented site branding template tags to reduce the need to override templates

Description of the change

Implemented site branding template tags to reduce the need to override templates

To post a comment you must log in.
lp:~devcamcar/django-nova/lp711010 updated
17. By Devin Carlen

Added missing tag reference

Revision history for this message
Ken Pepple (ken-pepple) wrote :

i'm not sure how to expire credentials, but the rest of the site branding (minus /admin which i reported in bug report 711024) looks good.

review: Approve
lp:~devcamcar/django-nova/lp711010 updated
18. By Devin Carlen

Simplified site branding tag

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/django_nova/templates/django_nova/credentials/expired.html'
2--- src/django_nova/templates/django_nova/credentials/expired.html 2011-01-31 20:08:02 +0000
3+++ src/django_nova/templates/django_nova/credentials/expired.html 2011-02-01 19:22:33 +0000
4@@ -1,3 +1,4 @@
5+{% load django_nova_tags %}
6 <!DOCTYPE html>
7 <html lang="en" xml:lang="en">
8 <head>
9@@ -7,7 +8,10 @@
10 <body>
11 <center>
12 <h1>The link you clicked has expired.</h1>
13- <p style="width:460px;">This credentials download link you have reached is either invalid or has expired. Each link is only good for one use. If you need to download your credentials again, please contact the support team.</p>
14+ <p style="width:460px;">This credentials download link you have reached
15+ is either invalid or has expired. Each link is only good for one use. If
16+ you need to download your credentials again, please contact the
17+ {% site_branding %} support team.</p>
18 </center>
19 </body>
20 </html>
21
22=== added file 'src/django_nova/templatetags/django_nova_tags.py'
23--- src/django_nova/templatetags/django_nova_tags.py 1970-01-01 00:00:00 +0000
24+++ src/django_nova/templatetags/django_nova_tags.py 2011-02-01 19:22:33 +0000
25@@ -0,0 +1,37 @@
26+# vim: tabstop=4 shiftwidth=4 softtabstop=4
27+
28+# Copyright 2010 United States Government as represented by the
29+# Administrator of the National Aeronautics and Space Administration.
30+# All Rights Reserved.
31+#
32+# Licensed under the Apache License, Version 2.0 (the "License"); you may
33+# not use this file except in compliance with the License. You may obtain
34+# a copy of the License at
35+#
36+# http://www.apache.org/licenses/LICENSE-2.0
37+#
38+# Unless required by applicable law or agreed to in writing, software
39+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
40+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
41+# License for the specific language governing permissions and limitations
42+# under the License.
43+
44+"""
45+Template tags for working with django_nova.
46+"""
47+
48+from django import template
49+from django.conf import settings
50+
51+
52+register = template.Library()
53+
54+
55+class SiteBrandingNode(template.Node):
56+ def render(self, context):
57+ return settings.SITE_BRANDING
58+
59+@register.tag
60+def site_branding(parser, token):
61+ return SiteBrandingNode()
62+

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: