From ffb4b75aa8b332a94d3e3d8dcca0eeb7e87f3516 Mon Sep 17 00:00:00 2001 From: Le Bao Hiep Date: Thu, 28 Sep 2023 11:54:05 +0700 Subject: [PATCH] Fix missed URLs --- judge/sitemap.py | 2 +- judge/views/organization.py | 4 ---- templates/organization/requests/log.html | 2 +- templates/organization/requests/pending.html | 4 ++-- templates/organization/requests/tabs.html | 10 +++++----- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/judge/sitemap.py b/judge/sitemap.py index 5c3426ad2..2cac0ab6c 100644 --- a/judge/sitemap.py +++ b/judge/sitemap.py @@ -45,7 +45,7 @@ class OrganizationSitemap(Sitemap): priority = 0.5 def items(self): - return Organization.objects.values_list('id', 'slug') + return Organization.objects.values_list('slug') def location(self, obj): return reverse('organization_home', args=obj) diff --git a/judge/views/organization.py b/judge/views/organization.py index de8ddeac5..f694c874e 100644 --- a/judge/views/organization.py +++ b/judge/views/organization.py @@ -174,8 +174,6 @@ class OrganizationRequestForm(Form): class RequestJoinOrganization(LoginRequiredMixin, SingleObjectMixin, FormView): model = Organization - slug_field = 'key' - slug_url_kwarg = 'key' template_name = 'organization/requests/request.html' form_class = OrganizationRequestForm @@ -224,8 +222,6 @@ def get_object(self, queryset=None): class OrganizationRequestBaseView(LoginRequiredMixin, SingleObjectTemplateResponseMixin, SingleObjectMixin, View): model = Organization - slug_field = 'key' - slug_url_kwarg = 'key' tab = None def get_object(self, queryset=None): diff --git a/templates/organization/requests/log.html b/templates/organization/requests/log.html index 840fc59b9..1f38b839d 100644 --- a/templates/organization/requests/log.html +++ b/templates/organization/requests/log.html @@ -15,7 +15,7 @@ {{ link_user(r.user) }} - + {{- r.time|date(_("N j, Y, H:i")) -}} diff --git a/templates/organization/requests/pending.html b/templates/organization/requests/pending.html index 3d300a4b6..892b78cca 100644 --- a/templates/organization/requests/pending.html +++ b/templates/organization/requests/pending.html @@ -20,7 +20,7 @@ {% for form in formset %} {{ form.id }}{{ link_user(form.instance.user) }} - + {{ form.instance.time|date(_("N j, Y, H:i")) }} {{ form.state }} @@ -36,4 +36,4 @@ {% else %}

{{ _('There are no requests to approve.') }}

{% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/organization/requests/tabs.html b/templates/organization/requests/tabs.html index 569f75a68..178a2ef4a 100644 --- a/templates/organization/requests/tabs.html +++ b/templates/organization/requests/tabs.html @@ -1,16 +1,16 @@
-
\ No newline at end of file +