Split urlpatterns accordingly
@@ -7,8 +7,12 @@ from django.conf.urls import url
from readthedocs.core.forms import UserProfileForm
from readthedocs.profiles import views
+# Split URLs into different lists to be able to selectively import them from a
+# another application (like Read the Docs Corporate), where we may don't need to
+# define Token URLs, for example.
+urlpatterns = []
-urlpatterns = [
+account_urls = [
url(
r'^edit/',
views.edit_profile,
@@ -26,6 +30,8 @@ urlpatterns = [
),
]
+urlpatterns += account_urls
+
tokens_urls = [
url(
r'^tokens/$',
