Django 1.4 and naturaltime
parent
a77a01005a
commit
48f6ee1107
|
@ -5,5 +5,5 @@
|
|||
{% block author %}{% endblock %}
|
||||
|
||||
{% block extra-snipt-header %}
|
||||
<h3>{{ snipt.publish_date|naturalday }}</h3>
|
||||
<h3>{{ snipt.publish_date|naturaltime }}</h3>
|
||||
{% endblock %}
|
||||
|
|
|
@ -101,7 +101,7 @@ TEMPLATE_LOADERS = (
|
|||
# 'django.template.loaders.eggs.Loader',
|
||||
)
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.core.context_processors.auth',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.media',
|
||||
|
@ -110,10 +110,9 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
|||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.csrf.CsrfResponseMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'pagination.middleware.PaginationMiddleware',
|
||||
|
|
|
@ -81,9 +81,9 @@
|
|||
</li>
|
||||
{% endblock %}
|
||||
{% if snipt.blog_post %}
|
||||
<li class="created" title="{{ snipt.publish_date|date:"Y-m-d\TH:i:s" }}">{{ snipt.publish_date|naturalday }}</li>
|
||||
<li class="created" title="{{ snipt.publish_date|date:"Y-m-d\TH:i:s" }}">{{ snipt.publish_date|naturaltime }}</li>
|
||||
{% else %}
|
||||
<li class="created" title="{{ snipt.created|date:"Y-m-d\TH:i:s" }}">{{ snipt.created|naturalday }}</li>
|
||||
<li class="created" title="{{ snipt.created|date:"Y-m-d\TH:i:s" }}">{{ snipt.created|naturaltime }}</li>
|
||||
{% endif %}
|
||||
<li class="comments"><a href="{{ snipt.get_full_absolute_url }}#disqus_thread" data-disqus-identifier="{{ snipt.pk }}"></a></li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue