Skip to content

Commit

Permalink
Merge pull request #4965 from nyaruka/blog-updates
Browse files Browse the repository at this point in the history
Remove blog redirect pattern
  • Loading branch information
ericnewcomer authored Nov 14, 2023
2 parents 306cb71 + c42c247 commit b35c6e9
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ media/recordings
media/test_orgs
media/tmp
media/attachments
media/blog

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions temba/contacts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 0 additions & 2 deletions temba/public/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from .sitemaps import PublicViewSitemap, VideoSitemap
from .views import (
Android,
Blog,
DemoGenerateCoupon,
DemoOrderStatus,
IndexView,
Expand All @@ -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"),
Expand Down
8 changes: 1 addition & 7 deletions temba/public/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 _
Expand All @@ -21,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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion temba/settings_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b35c6e9

Please sign in to comment.