# HG changeset patch # User Todd Larsen # Date 1227424513 0 # Node ID 0f34318f56938e54721dfcbe27b0f30f88a20bf1 # Parent e7cb5819f7e9cf33996750f00796b22e63e7798a Add release tag string, Melange "badge" image, and Google App Engine version to base.html template. Patch by: Todd Larsen diff -r e7cb5819f7e9 -r 0f34318f5693 app/soc/content/images/melange-logo.jpg Binary file app/soc/content/images/melange-logo.jpg has changed diff -r e7cb5819f7e9 -r 0f34318f5693 app/soc/logic/system.py --- a/app/soc/logic/system.py Sun Nov 23 06:34:22 2008 +0000 +++ b/app/soc/logic/system.py Sun Nov 23 07:15:13 2008 +0000 @@ -22,6 +22,7 @@ ] +import os import settings @@ -32,3 +33,9 @@ more sophisticated in the future. """ return settings.DEBUG + +def getAppVersion(): + """Returns the Google App Engine "version" of the running instance. + """ + return os.environ.get('CURRENT_VERSION_ID') + diff -r e7cb5819f7e9 -r 0f34318f5693 app/soc/release.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/release.py Sun Nov 23 07:15:13 2008 +0000 @@ -0,0 +1,20 @@ +# Copyright 2008 the Melange authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__authors__ = [ + '"Todd Larsen" ', + ] + +RELEASE_TAG = '0.0a20081123' + diff -r e7cb5819f7e9 -r 0f34318f5693 app/soc/templates/soc/base.html --- a/app/soc/templates/soc/base.html Sun Nov 23 06:34:22 2008 +0000 +++ b/app/soc/templates/soc/base.html Sun Nov 23 07:15:13 2008 +0000 @@ -118,10 +118,11 @@
{% block badge %} -Powered by Melange - -* - +Powered by Melange +
+Release {{ soc_release }} {% endblock %}
@@ -158,7 +159,8 @@ {% block footer %} ©2008 Google - Google Home - -Privacy Policy +Privacy Policy - +Version {{ gae_version }} {% endblock %} diff -r e7cb5819f7e9 -r 0f34318f5693 app/soc/views/helper/responses.py --- a/app/soc/views/helper/responses.py Sun Nov 23 06:34:22 2008 +0000 +++ b/app/soc/views/helper/responses.py Sun Nov 23 07:15:13 2008 +0000 @@ -28,6 +28,7 @@ from django import http from django.template import loader +from soc import release from soc.logic import accounts from soc.logic import system from soc.logic.models import site @@ -107,6 +108,9 @@ context['sign_out'] = users.create_logout_url(request.path) context['sidebar_menu_items'] = sidebar.SIDEBAR + context['soc_release'] = release.RELEASE_TAG + context['gae_version'] = system.getAppVersion() + settings = site.logic.getFromFields( scope_path=site.logic.DEF_SITE_SCOPE_PATH, link_id=site.logic.DEF_SITE_LINK_ID)