Skip to content

Commit 28e34b7

Browse files
feanilclaude
andcommitted
feat: delete legacy marketing static templates and their URL routes
Remove the 14 template files that were served locally when ENABLE_MKTG_SITE=False. These pages (about, blog, contact, donate, faq, help, honor, jobs, media-kit, news, press, privacy, tos, sitemap.xml) should now only live on the external marketing site configured via MKTG_URLS. Also remove the stanford-style theme overrides for about.html and tos.html, the hardcoded URL patterns for the deleted templates, the honor.html iframing special case from the render view, and the tests that exercised these now-deleted routes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8629290 commit 28e34b7

19 files changed

Lines changed: 0 additions & 424 deletions

File tree

lms/djangoapps/static_template_view/tests/test_views.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,10 @@
77
from django.test import TestCase
88
from django.urls import reverse
99

10-
from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context
11-
1210

1311
class MarketingSiteViewTests(TestCase):
1412
""" Tests for the marketing site views """
1513

16-
def _test_view(self, view_name, mimetype):
17-
"""
18-
Gets a view and tests that it exists.
19-
"""
20-
resp = self.client.get(reverse(view_name))
21-
assert resp.status_code == 200
22-
assert resp['Content-Type'] == mimetype
23-
24-
def test_sitemap(self):
25-
"""
26-
Test the sitemap view
27-
"""
28-
self._test_view('sitemap_xml', 'application/xml')
29-
30-
def test_about(self):
31-
"""
32-
Test the about view
33-
"""
34-
self._test_view('about', 'text/html')
35-
36-
def test_about_with_site_configuration(self):
37-
"""
38-
Test the about view with the header and content set in SiteConfiguration.
39-
"""
40-
test_header = "Very Unique Test Header"
41-
test_content = "Very Unique Test Content"
42-
test_header_key = 'static_template_about_header'
43-
test_content_key = 'static_template_about_content'
44-
response = None
45-
configuration = {test_header_key: test_header, test_content_key: test_content}
46-
with with_site_configuration_context(configuration=configuration):
47-
response = self.client.get(reverse("about"))
48-
self.assertContains(response, test_header)
49-
self.assertContains(response, test_content)
50-
51-
def test_about_with_site_configuration_and_html(self):
52-
"""
53-
Test the about view with html in the header.
54-
"""
55-
test_header = "<i>Very Unique Test Header</i>"
56-
test_content = "<i>Very Unique Test Content</i>"
57-
test_header_key = 'static_template_about_header'
58-
test_content_key = 'static_template_about_content'
59-
response = None
60-
configuration = {test_header_key: test_header, test_content_key: test_content}
61-
with with_site_configuration_context(configuration=configuration):
62-
response = self.client.get(reverse("about"))
63-
self.assertContains(response, test_header)
64-
self.assertContains(response, test_content)
65-
6614
def test_404(self):
6715
"""
6816
Test the 404 view.

lms/djangoapps/static_template_view/urls.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88
from lms.djangoapps.static_template_view import views
99

1010
urlpatterns = [
11-
path('blog', views.render, {'template': 'blog.html'}, name="blog"),
12-
path('contact', views.render, {'template': 'contact.html'}, name="contact"),
13-
path('donate', views.render, {'template': 'donate.html'}, name="donate"),
14-
path('faq', views.render, {'template': 'faq.html'}, name="faq"),
15-
path('help', views.render, {'template': 'help.html'}, name="help_edx"),
16-
path('jobs', views.render, {'template': 'jobs.html'}, name="jobs"),
17-
path('news', views.render, {'template': 'news.html'}, name="news"),
18-
path('press', views.render, {'template': 'press.html'}, name="press"),
19-
path('media-kit', views.render, {'template': 'media-kit.html'}, name="media-kit"),
2011
path('copyright', views.render, {'template': 'copyright.html'}, name="copyright"),
2112

2213
# Press releases

lms/djangoapps/static_template_view/views.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ def render(request, template):
5858

5959
try:
6060
context = {}
61-
# This is necessary for the dialog presented with the TOS in /register
62-
if template == 'honor.html':
63-
context['allow_iframing'] = True
6461
# Format Examples: static_template_about_header
6562
configuration_base = 'static_template_' + template.replace('.html', '').replace('-', '_')
6663
page_header = configuration_helpers.get_value(configuration_base + '_header')

lms/templates/static_templates/about.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

lms/templates/static_templates/blog.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

lms/templates/static_templates/contact.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

lms/templates/static_templates/donate.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

lms/templates/static_templates/faq.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

lms/templates/static_templates/help.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

lms/templates/static_templates/honor.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)