mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Make news translations
This commit is contained in:
@ -26,7 +26,7 @@ section.news_event:nth-child(even) {
|
||||
{% block content %}
|
||||
<h3>{% trans %}News{% endtrans %}</h3>
|
||||
<hr>
|
||||
<h4>Notice</h4>
|
||||
<h4>{% trans %}Notice{% endtrans %}</h4>
|
||||
{% for news in object_list.filter(type="NOTICE") %}
|
||||
<section class="news_notice">
|
||||
<h4>{{ news.title }}</h4>
|
||||
@ -34,7 +34,7 @@ section.news_event:nth-child(even) {
|
||||
</section>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
<h4>Calls</h4>
|
||||
<h4>{% trans %}Calls{% endtrans %}</h4>
|
||||
{% for news in object_list.filter(dates__start_date__lte=timezone.now(), dates__end_date__gte=timezone.now(), type="CALL") %}
|
||||
<section class="news_call">
|
||||
<h4>{{ news.title }}</h4>
|
||||
@ -48,7 +48,7 @@ section.news_event:nth-child(even) {
|
||||
</section>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
<h4>Events</h4>
|
||||
<h4>{% trans %}Events{% endtrans %}</h4>
|
||||
{% for news in object_list.filter(dates__end_date__gte=timezone.now(), type="EVENT") %}
|
||||
<section class="news_event">
|
||||
<h4>{{ news.title }}</h4>
|
||||
@ -63,7 +63,7 @@ section.news_event:nth-child(even) {
|
||||
</section>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
<h4>Weekly</h4>
|
||||
<h4>{% trans %}Weekly{% endtrans %}</h4>
|
||||
{% for news in object_list.filter(dates__end_date__gte=timezone.now(), type="WEEKLY").distinct() %}
|
||||
<!-- buggy when more than one news, anyway, we won't use it this way -->
|
||||
{% for d in news.dates.all() %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
from django.shortcuts import render
|
||||
from django.views.generic import ListView, DetailView, RedirectView
|
||||
from django.views.generic.edit import UpdateView, CreateView
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.urlresolvers import reverse, reverse_lazy
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.utils import timezone
|
||||
|
Reference in New Issue
Block a user