Skip to content

Commit 01347ab

Browse files
authored
Merge pull request #5296 from rtfd/davidfischer/extensions-control-urls
Allow extensions to control URL structure
2 parents 5978ec9 + 64d5c53 commit 01347ab

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

readthedocs/settings/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class CommunityBaseSettings(Settings):
5959
CSRF_COOKIE_HTTPONLY = True
6060
CSRF_COOKIE_AGE = 30 * 24 * 60 * 60
6161

62+
# Read the Docs
63+
READ_THE_DOCS_EXTENSIONS = ext
64+
6265
# Application classes
6366
@property
6467
def INSTALLED_APPS(self): # noqa

readthedocs/urls.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,12 @@
136136
# Include Do Not Track URLs if DNT is supported
137137
groups.append(dnt_urls)
138138

139-
if settings.USE_PROMOS:
140-
# Include donation URL's
139+
140+
if settings.READ_THE_DOCS_EXTENSIONS:
141141
groups.append([
142-
url(r'^sustainability/', include('readthedocsext.donate.urls')),
142+
url(r'^', include('readthedocsext.urls'))
143143
])
144144

145-
if 'readthedocsext.embed' in settings.INSTALLED_APPS:
146-
api_urls.insert(
147-
0,
148-
url(r'^api/v1/embed/', include('readthedocsext.embed.urls')),
149-
)
150-
151145
if not getattr(settings, 'USE_SUBDOMAIN', False) or settings.DEBUG:
152146
groups.insert(0, docs_urls)
153147
if getattr(settings, 'ALLOW_ADMIN', True):

0 commit comments

Comments
 (0)