import datetime
from django.shortcuts import render
from apps.splash.models import SplashEvent, SplashYear


def index(request):
    # I'm really sorry ...
    splash_year = SplashYear.objects.get(start_date__gt=str(datetime.date.today() - datetime.timedelta(180)))
    return render(request, 'splash/base.html', {'splash_year': splash_year })

@@ -337,8 +337,347 @@
 year %7D)%0A
+%0A%0A# And I'm really sorry for this ...%0Adef _merge_events(splash_events):%0A    events = %5B%5D%0A%0A    for event in splash_events:%0A        if len(events) %3E 0 and event.start_time.strftime('%25d-%25m') == events%5B-1%5D%5B0%5D.start_time.strftime('%25d-%25m'):%0A            events%5B-1%5D.append(event)%0A        else:%0A            events.append(%5Bevent%5D)%0A%0A    return events%0A

Add method for merging duplicated events