fix ups
This commit is contained in:
		@ -1351,7 +1351,6 @@ class LogQuerySet(models.QuerySet):
 | 
			
		||||
            logs = yaml.load(data)
 | 
			
		||||
 | 
			
		||||
            # we need to preload diffusions, sounds and tracks
 | 
			
		||||
            # we get them all at once, in order to reduce db calls
 | 
			
		||||
            rels = {
 | 
			
		||||
                'diffusion': self._get_rel_objects(logs, Diffusion, 'diffusion'),
 | 
			
		||||
                'sound': self._get_rel_objects(logs, Sound, 'sound'),
 | 
			
		||||
 | 
			
		||||
@ -811,8 +811,11 @@ class TimetablePage(DatedListPage):
 | 
			
		||||
    def get_queryset(self, request, context):
 | 
			
		||||
        diffs = []
 | 
			
		||||
        for date in context['nav_dates']['dates']:
 | 
			
		||||
            items = aircox.models.Diffusion.objects.at(self.station, date)
 | 
			
		||||
            items = [ DiffusionPage.as_item(item) for item in items ]
 | 
			
		||||
            items = [
 | 
			
		||||
                DiffusionPage.as_item(item)
 | 
			
		||||
                for item in aircox.models.Diffusion.objects \
 | 
			
		||||
                                  .station(self.station).at(date)
 | 
			
		||||
            ]
 | 
			
		||||
            diffs.append((date, items))
 | 
			
		||||
        return diffs
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -489,8 +489,11 @@ class SectionTimetable(Section,DatedBaseList):
 | 
			
		||||
        from aircox_cms.models import DiffusionPage
 | 
			
		||||
        diffs = []
 | 
			
		||||
        for date in context['nav_dates']['dates']:
 | 
			
		||||
            items = aircox.models.Diffusion.objects.at(self.station, date)
 | 
			
		||||
            items = [ DiffusionPage.as_item(item) for item in items ]
 | 
			
		||||
            items = [
 | 
			
		||||
                DiffusionPage.as_item(item)
 | 
			
		||||
                for item in aircox.models.Diffusion.objects \
 | 
			
		||||
                                  .station(self.station).at(date)
 | 
			
		||||
            ]
 | 
			
		||||
            diffs.append((date, items))
 | 
			
		||||
        return diffs
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@
 | 
			
		||||
{% if nav_dates.dates %}
 | 
			
		||||
<nav class="nav_dates">
 | 
			
		||||
    {% if target %}
 | 
			
		||||
    <a href="{{ target.url }}?date={{ nav_dates.today|date:"Y-m-d" }}" title="{% trans "go to today" %}">○</a>
 | 
			
		||||
    <a href="{{ target.url }}?date={{ nav_dates.today|date:"Y-m-d" }}" title="{% trans "go to today" %}">●</a>
 | 
			
		||||
 | 
			
		||||
    {% if nav_dates.prev %}
 | 
			
		||||
    <a href="{{ target.url }}?date={{ nav_dates.prev|date:"Y-m-d" }}" title="{% trans "previous days" %}">◀</a>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user