Skip to content

Commit

Permalink
corrige des valeurs par defaut
Browse files Browse the repository at this point in the history
  • Loading branch information
firm1 committed Jun 7, 2014
1 parent 19afc12 commit e452bf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/base.html
Expand Up @@ -519,7 +519,7 @@ <h3 class="subtitle">{{ headlinesub|safe }}</h3>
<footer class="page-footer">
<div class="wrapper">
<p>
Zeste de Savoir &bull; 2014 (<a href="{{git_version.url}}">{{git_version.name}}</a>)
Zeste de Savoir &bull; 2014 &bull; Version : <a href="{{git_version.url}}">{{git_version.name}}</a>
</p>
<ul>
<li><a href="{% url "zds.pages.views.eula" %}">CGU</a></li>
Expand Down
4 changes: 3 additions & 1 deletion zds/utils/__init__.py
Expand Up @@ -27,7 +27,7 @@ def get_git_version():
repo = Repo(settings.SITE_ROOT)
branch = repo.active_branch
commit = repo.head.commit.tree.hexsha
v = u"{0}/{1}".format(branch, commit[:5])
v = u"{0}/{1}".format(branch, commit[:7])
return {'name':v, 'url':u'https://github.com/zestedesavoir/zds-site/tree/{0}'.format(commit)}
except:
return {'name':'', 'url':''}
Expand All @@ -40,6 +40,8 @@ def process_request(self, request):


def render_template(tmpl, dct=None):
if dct is None:
dct = {}
dct['git_version']=get_git_version()
return render_to_response(
tmpl, dct, context_instance=RequestContext(get_current_request()))
Expand Down

0 comments on commit e452bf4

Please sign in to comment.