From 9860e23dbfb41cf89f4bd7d2f063272a82f60ea7 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Mon, 16 Aug 2021 15:56:56 +0530 Subject: [PATCH] chore: order upcoming by starting date --- app/app/urls.py | 14 +++++++------- .../management/commands/create_page_cache.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/app/urls.py b/app/app/urls.py index 477fe02d490..89e5611ec91 100644 --- a/app/app/urls.py +++ b/app/app/urls.py @@ -367,15 +367,15 @@ name='hackathon_project_page' ), path('modal/save_project/', dashboard.views.hackathon_save_project, name='hackathon_save_project'), - # TODO: revisit if we need to keep these urls for legacy links - # re_path(r'^hackathon/?$/?', dashboard.views.hackathon, name='hackathon_idx'), - # re_path(r'^hackathon/(.*)?$', dashboard.views.hackathon, name='hackathon_idx2'), + url(r'^hackathon//?$/?', dashboard.views.hackathon, name='hackathon'), url(r'^hackathon///?$/?', dashboard.views.hackathon, name='hackathon'), - path('hackathon-list/', dashboard.views.get_hackathons, name='get_hackathons'), - path('hackathon-list', dashboard.views.get_hackathons, name='get_hackathons2'), - re_path(r'^hackathon/?$', dashboard.views.get_hackathons, name='get_hackathons3'), - re_path(r'^hackathons/?$', dashboard.views.get_hackathons, name='get_hackathons4'), + + # list all hackathons + re_path(r'^hackathon-list/?$', dashboard.views.get_hackathons, name='get_hackathons'), + re_path(r'^hackathon/?$', dashboard.views.get_hackathons, name='get_hackathons'), + re_path(r'^hackathons/?$', dashboard.views.get_hackathons, name='get_hackathons'), + url(r'^register_hackathon/', dashboard.views.hackathon_registration, name='hackathon_registration'), path('api/v0.1/hackathon//save/', dashboard.views.save_hackathon, name='save_hackathon'), path('api/v1/hackathon//prizes', dashboard.views.hackathon_prizes, name='hackathon_prizes_api'), diff --git a/app/perftools/management/commands/create_page_cache.py b/app/perftools/management/commands/create_page_cache.py index 43dc426e9d8..cd09cb959ba 100644 --- a/app/perftools/management/commands/create_page_cache.py +++ b/app/perftools/management/commands/create_page_cache.py @@ -291,7 +291,7 @@ def create_hackathon_list_page_cache(): view = 'hackathons' keyword = 'hackathons' current_hackathon_events = HackathonEvent.objects.current().filter(visible=True).order_by('-start_date') - upcoming_hackathon_events = HackathonEvent.objects.upcoming().filter(visible=True).order_by('-start_date') + upcoming_hackathon_events = HackathonEvent.objects.upcoming().filter(visible=True).order_by('start_date') finished_hackathon_events = HackathonEvent.objects.finished().filter(visible=True).order_by('-start_date') events = []