From 029af9c7d3a493e2d56cbcf2af0a4422b38d814a Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 5 Jan 2024 16:57:00 -0500 Subject: [PATCH] fix: /clubs being rendered as api --- core/api/urls.py | 2 +- core/api/views/organization.py | 2 +- core/urls.py | 4 +++- poetry.lock | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/api/urls.py b/core/api/urls.py index 65c6b7bc..171650d9 100644 --- a/core/api/urls.py +++ b/core/api/urls.py @@ -19,7 +19,7 @@ name="api_announcement_feed", ), path("announcements", AnnouncementListAll.as_view(), name="api_all_announcements"), - path("organizations", OrganizationList.as_view(), name="api_organization_list"), + path("organizations", ApiOrganizationList.as_view(), name="api_organization_list"), path( "organization/", OrganizationDetail.as_view(), diff --git a/core/api/views/organization.py b/core/api/views/organization.py index edee3502..8e529bfc 100644 --- a/core/api/views/organization.py +++ b/core/api/views/organization.py @@ -6,7 +6,7 @@ from ... import models -class OrganizationList(ListAPIViewWithFallback): +class ApiOrganizationList(ListAPIViewWithFallback): queryset = ( models.Organization.objects.filter(is_active=True) .annotate(num_members=Count("member")) diff --git a/core/urls.py b/core/urls.py index 2e28c643..19196c83 100644 --- a/core/urls.py +++ b/core/urls.py @@ -4,7 +4,7 @@ from .api.views import * from .utils.sitemaps import * from .views.index import * -from .views.organization import OrganizationShort +from .views.organization import * from .views.post import * from .views.raffle import * from .views.timetable import * @@ -26,6 +26,8 @@ "blog": BlogSitemap, "announcements": AnnouncementsSitemap, "clubs": ClubsSitemap, + "flatpages": FlatpagesSitemap, + } }, name="django.contrib.sitemaps.sitemaps", diff --git a/poetry.lock b/poetry.lock index 395da1ff..ffa25bc7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1483,13 +1483,13 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "referencing" -version = "0.32.0" +version = "0.32.1" description = "JSON Referencing + Python" optional = false python-versions = ">=3.8" files = [ - {file = "referencing-0.32.0-py3-none-any.whl", hash = "sha256:bdcd3efb936f82ff86f993093f6da7435c7de69a3b3a5a06678a6050184bee99"}, - {file = "referencing-0.32.0.tar.gz", hash = "sha256:689e64fe121843dcfd57b71933318ef1f91188ffb45367332700a86ac8fd6161"}, + {file = "referencing-0.32.1-py3-none-any.whl", hash = "sha256:7e4dc12271d8e15612bfe35792f5ea1c40970dadf8624602e33db2758f7ee554"}, + {file = "referencing-0.32.1.tar.gz", hash = "sha256:3c57da0513e9563eb7e203ebe9bb3a1b509b042016433bd1e45a2853466c3dd3"}, ] [package.dependencies] @@ -1865,4 +1865,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.12.1" -content-hash = "07a1273d2e9fa3f187b19d29486d8cfa034dab8b70640f18e935d811594c2414" +content-hash = "8fbf1dfce101ba5f0dcc9cb92bf544f63e0e269b39486e3bda72b7c22b650dd7"