Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
add {{ powered_by }} in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
jedie committed Feb 26, 2015
1 parent 654ecfe commit 82adc13
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pylucid/__init__.py
Expand Up @@ -13,7 +13,7 @@

from __future__ import absolute_import, division, print_function

__version__ = (2,0,0)
__version__ = (2,0,0,"beta")


VERSION_STRING = '.'.join(str(part) for part in __version__)
Expand Down
3 changes: 2 additions & 1 deletion pylucid/base_settings.py
Expand Up @@ -69,7 +69,8 @@
'django.core.context_processors.tz',
'sekizai.context_processors.sekizai',
'django.core.context_processors.static',
'cms.context_processors.cms_settings'
'cms.context_processors.cms_settings',
'pylucid.context_processors.pylucid',
)

# Static files (CSS, JavaScript, Images)
Expand Down
23 changes: 23 additions & 0 deletions pylucid/context_processors.py
@@ -0,0 +1,23 @@
# coding: utf-8

"""
PyLucid context processor
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyleft: 2009-2015 by the PyLucid team, see AUTHORS for more details.
:license: GNU GPL v3 or above, see LICENSE for more details.
"""

from django.utils.safestring import mark_safe

from . import VERSION_STRING


def pylucid(request):
"""
A django TEMPLATE_CONTEXT_PROCESSORS
"""
context = {
"powered_by": mark_safe('<a href="http://www.pylucid.org">PyLucid v%s</a>' % VERSION_STRING),
}
return context
2 changes: 1 addition & 1 deletion pylucid/templates/bootstrap/base.html
Expand Up @@ -59,7 +59,7 @@
{% block content %}{% endblock %}
{% endblock %}

<footer>{% block footer %}{% include "includes/footer.html" %}{% endblock %}</footer>
<footer><p>{{ powered_by }} | {% block footer %}{% include "includes/footer.html" %}{% endblock %}</p></footer>
</div>
{# Placed at the end of the document so the pages load faster #}
{% compress js %}
Expand Down
@@ -1,13 +1,10 @@
{% load cms_tags %}

{% spaceless %}
<p>
© example_project |

{% if post.date_published %}{# djangocms-blog #}
{{ post.date_published|date:"SHORT_DATE_FORMAT" }}
{% else %}
{% page_attribute "changed_date" as date_changed %}{{ date_changed|date:"SHORT_DATE_FORMAT" }}
{% endif %}
</p>
{% endspaceless %}

0 comments on commit 82adc13

Please sign in to comment.