From 51114a4f88afacebd2797025c25505d5a0e8b6a8 Mon Sep 17 00:00:00 2001 From: Eric Newcomer Date: Mon, 13 Nov 2023 20:52:54 +0000 Subject: [PATCH 1/4] Remove blog redirect pattern --- .gitignore | 1 + temba/public/urls.py | 2 -- temba/public/views.py | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index cf55d4bc3da..4b216f9ee09 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ media/recordings media/test_orgs media/tmp media/attachments +media/blog # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/temba/public/urls.py b/temba/public/urls.py index 91bb32b6e85..1e6f2531844 100644 --- a/temba/public/urls.py +++ b/temba/public/urls.py @@ -7,7 +7,6 @@ from .sitemaps import PublicViewSitemap, VideoSitemap from .views import ( Android, - Blog, DemoGenerateCoupon, DemoOrderStatus, IndexView, @@ -24,7 +23,6 @@ urlpatterns = [ re_path(r"^$", IndexView.as_view(), {}, "public.public_index"), re_path(r"^sitemap\.xml$", sitemap, {"sitemaps": sitemaps}, name="public.sitemaps"), - re_path(r"^blog/$", Blog.as_view(), {}, "public.public_blog"), re_path(r"^welcome/$", Welcome.as_view(), {}, "public.public_welcome"), re_path(r"^android/$", Android.as_view(), {}, "public.public_android"), re_path(r"^public/welcome/$", WelcomeRedirect.as_view(), {}, "public.public_welcome_redirect"), diff --git a/temba/public/views.py b/temba/public/views.py index 516756ed3d6..ada9dc0e8db 100644 --- a/temba/public/views.py +++ b/temba/public/views.py @@ -2,7 +2,6 @@ from smartmin.views import SmartCreateView, SmartCRUDL, SmartFormView, SmartListView, SmartReadView, SmartTemplateView -from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, JsonResponse from django.urls import reverse from django.utils.translation import gettext_lazy as _ @@ -160,11 +159,6 @@ def pre_save(self, obj): return obj -class Blog(RedirectView): - # whitelabels don't have blogs, so we don't use the brand domain here - url = "http://blog." + settings.HOSTNAME - - class DemoGenerateCoupon(View): """ Used to demo webhook calls from sample flow From a186018701a2471304b6fc54172f1d5e62508f46 Mon Sep 17 00:00:00 2001 From: Eric Newcomer Date: Mon, 13 Nov 2023 21:08:06 +0000 Subject: [PATCH 2/4] Remove blog from sitemap --- temba/settings_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temba/settings_common.py b/temba/settings_common.py index edaaeede1d6..79b93717d0d 100644 --- a/temba/settings_common.py +++ b/temba/settings_common.py @@ -201,7 +201,7 @@ # other urls to add APP_URLS = [] -SITEMAP = ("public.public_index", "public.public_blog", "public.video_list", "api") +SITEMAP = ("public.public_index", "public.video_list", "api") INSTALLED_APPS = ( "django.contrib.auth", From 678f6a036f77404c4ba823a4b301d171720b0ac3 Mon Sep 17 00:00:00 2001 From: Eric Newcomer Date: Tue, 14 Nov 2023 00:34:02 +0000 Subject: [PATCH 3/4] Remove unused description --- temba/public/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temba/public/views.py b/temba/public/views.py index ada9dc0e8db..17e62338b02 100644 --- a/temba/public/views.py +++ b/temba/public/views.py @@ -20,7 +20,7 @@ class IndexView(NoNavMixin, SmartTemplateView): template_name = "public/public_index.html" def derive_title(self): - return f"{self.request.branding['name']} - {self.request.branding['description']}" + return f"{self.request.branding['name']}" def pre_process(self, request, *args, **kwargs): response = super().pre_process(request, *args, **kwargs) From c42c2475c5891e2ee24a61083ee7791e5780af19 Mon Sep 17 00:00:00 2001 From: Eric Newcomer Date: Tue, 14 Nov 2023 01:00:43 +0000 Subject: [PATCH 4/4] Deterministic field order --- temba/contacts/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/temba/contacts/views.py b/temba/contacts/views.py index 56810453358..b8ebab69de8 100644 --- a/temba/contacts/views.py +++ b/temba/contacts/views.py @@ -1493,6 +1493,7 @@ def post(self, request, *args, **kwargs): class List(ContentMenuMixin, SpaMixin, OrgPermsMixin, SmartListView): menu_path = "/contact/fields" title = _("Fields") + default_order = "name" def build_content_menu(self, menu): menu.add_modax(