[damned-lies] Remove unnecessary dateformat context variable



commit d162a5fe75e09b345d266d5002838af032dbed8b
Author: Claude Paroz <claude 2xlibre net>
Date:   Sun May 15 00:09:39 2011 +0200

    Remove unnecessary dateformat context variable

 languages/views.py                              |    3 ---
 people/views.py                                 |    2 --
 templates/languages/language_release_stats.html |    2 +-
 templates/people/person_detail.html             |    2 +-
 4 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/languages/views.py b/languages/views.py
index 9769c62..cf245e8 100644
--- a/languages/views.py
+++ b/languages/views.py
@@ -24,7 +24,6 @@ import tarfile
 from datetime import date, datetime
 from django.shortcuts import render_to_response, get_object_or_404
 from django.utils.translation import ugettext as _
-from django.utils import formats
 from django.template import RequestContext
 from django.http import HttpResponse, HttpResponseRedirect
 from django.conf import settings
@@ -54,7 +53,6 @@ def language_all(request, locale, dtype):
             'doc': _("Documentation")}.get(dtype),
         'stats': stats,
         'scope': dtype.endswith('-part') and 'part' or 'full',
-        'dateformat': formats.get_format('DATE_FORMAT'),
     }
     return render_to_response('languages/language_all_modules.html', context,
                               context_instance=RequestContext(request))
@@ -91,7 +89,6 @@ def language_release(request, locale, release_name, dtype):
         'stats': stats,
         'dtype': dtype,
         'scope': dtype.endswith('-part') and 'part' or 'full',
-        'dateformat': formats.get_format('DATE_FORMAT'),
     }
     return render_to_response('languages/language_release.html', context,
                               context_instance=RequestContext(request))
diff --git a/people/views.py b/people/views.py
index 0940ed1..ce019ee 100644
--- a/people/views.py
+++ b/people/views.py
@@ -31,7 +31,6 @@ from django.db import IntegrityError
 from django.http import HttpResponseRedirect
 from django.shortcuts import render_to_response, get_object_or_404
 from django.template import RequestContext
-from django.utils import formats
 from django.utils.translation import ugettext_lazy, ugettext as _
 from django.views.generic import ListView, DetailView, UpdateView
 
@@ -64,7 +63,6 @@ class PersonDetailView(DetailView):
             'all_languages': all_languages,
             'on_own_page': self.request.user.is_authenticated() and self.object.username == self.request.user.username,
             'states': states,
-            'dateformat': formats.get_format('DATE_FORMAT'),
         })
         return context
 
diff --git a/templates/languages/language_release_stats.html b/templates/languages/language_release_stats.html
index 3ea1bb5..2d28e70 100644
--- a/templates/languages/language_release_stats.html
+++ b/templates/languages/language_release_stats.html
@@ -73,7 +73,7 @@
            {% if stat.state.name %}
              {% if stat.state.name != "None" %}
              <em><small>{{ stat.state.get_state }}</small></em></td>
-             <td><span style="display: none;">{{ stat.state.updated|date:"c" }}</span><em><small>{{ stat.state.updated|date:dateformat }}
+             <td><span style="display: none;">{{ stat.state.updated|date:"c" }}</span><em><small>{{ stat.state.updated|date:"DATE_FORMAT" }}
              {% else %}
                {% if stat.state.last_comment %}
                  <span class="comment">{{ stat.state.last_comment|truncatewords:12 }}</span>
diff --git a/templates/people/person_detail.html b/templates/people/person_detail.html
index ae74243..e168c8d 100644
--- a/templates/people/person_detail.html
+++ b/templates/people/person_detail.html
@@ -56,7 +56,7 @@ $(document).ready(function()
 <tbody>
 {% for state in states %}
 <tr>
-  <td><span style="display: none;">{{ state.updated|date:"c" }}</span>{{ state.updated|naturalday:dateformat }}</td>
+  <td><span style="display: none;">{{ state.updated|date:"c" }}</span>{{ state.updated|naturalday:"DATE_FORMAT" }}</td>
   <td><a href="{{ state.get_absolute_url }}">{{ state.branch.module.get_description }} - {{ state.branch.name }} - {{ state.domain.get_description }} - {{ state.language.get_name }}</a></td>
   <td>{{ state.get_state }}</td>
 </tr>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]