Specifying a namespace in django.conf.urls.include() without providing an app_name is deprecated.
Adding the app_name attribute in the included module.
This commit is contained in:
Awais Qureshi
2019-12-24 16:01:03 +05:00
parent c7c6242a0e
commit 928a84f969
11 changed files with 27 additions and 12 deletions

View File

@@ -6,6 +6,9 @@ from __future__ import absolute_import
from django.conf.urls import include, url
app_name = 'cms.djangoapps.api'
urlpatterns = [
url(r'^v1/', include('cms.djangoapps.api.v1.urls', namespace='v1')),
]

View File

@@ -8,6 +8,8 @@ from rest_framework.routers import DefaultRouter
from .views.course_runs import CourseRunViewSet
app_name = 'cms.djangoapps.api.v1'
router = DefaultRouter()
router.register(r'course_runs', CourseRunViewSet, base_name='course_run')
urlpatterns = router.urls

View File

@@ -14,6 +14,8 @@ from .views import (
MaintenanceIndexView
)
app_name = 'cms.djangoapps.maintenance'
urlpatterns = [
url(r'^$', MaintenanceIndexView.as_view(), name='maintenance_index'),
url(r'^force_publish_course/?$', ForcePublishCourseView.as_view(), name='force_publish_course'),

View File

@@ -217,7 +217,7 @@ if settings.FEATURES.get('ENABLE_SERVICE_STATUS'):
# changes go through our user portal and follow complexity requirements.
urlpatterns.append(url(r'^admin/password_change/$', handler404))
urlpatterns.append(url(r'^admin/auth/user/\d+/password/$', handler404))
urlpatterns.append(url(r'^admin/', include(admin.site.urls)))
urlpatterns.append(url(r'^admin/', admin.site.urls))
# enable entrance exams
if settings.FEATURES.get('ENTRANCE_EXAMS'):

View File

@@ -11,7 +11,8 @@ router = routers.DefaultRouter()
router.register(r'data', views.ExperimentDataViewSet, base_name='data')
router.register(r'key-value', views.ExperimentKeyValueViewSet, base_name='key_value')
app_name = 'experiments'
app_name = 'lms.djangoapps.experiments'
urlpatterns = [
url(r'^v0/custom/REV-934/', views_custom.Rev934.as_view(), name='rev_934'),
url(r'^v0/', include(router.urls, namespace='v0')),

View File

@@ -7,6 +7,9 @@ from django.conf.urls import include, url
from . import views
app_name = 'openedx.core.djangoapps.content_libraries'
# These URLs are only used in Studio. The LMS already provides all the
# API endpoints needed to serve XBlocks from content libraries using the
# standard XBlock REST API (see openedx.core.django_apps.xblock.rest_api.urls)

View File

@@ -9,6 +9,8 @@ from django.conf.urls import url
from .helpers import is_comprehensive_theming_enabled
from .views import ThemingAdministrationFragmentView
app_name = 'openedx.core.djangoapps.theming'
if is_comprehensive_theming_enabled():
urlpatterns = [
url(

View File

@@ -9,6 +9,8 @@ from . import views
# may act a bit differently in each (e.g. Studio stores user state ephemerally).
# If necessary at some point in the future, these URLs could be duplicated into
# urls_studio and urls_lms, and/or the views could be likewise duplicated.
app_name = 'openedx.core.djangoapps.xblock.rest_api'
urlpatterns = [
url(r'^api/xblock/v2/', include([
url(r'^xblocks/(?P<usage_key_str>[^/]+)/', include([

View File

@@ -111,7 +111,7 @@ edx-oauth2-provider==1.3.1
edx-opaque-keys[django]==2.0.1
edx-organizations==2.2.0
edx-proctoring-proctortrack==1.0.5
edx-proctoring==2.2.2
edx-proctoring==2.2.3
edx-rbac==1.0.5 # via edx-enterprise
edx-rest-api-client==1.9.2
edx-search==1.2.2
@@ -245,7 +245,7 @@ webob==1.8.5 # via xblock
wrapt==1.10.5
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.6#egg=xblock-drag-and-drop-v2==2.2.6
git+https://github.com/open-craft/xblock-poll@3c7dcaf6c933d914188f0740a60711603f948d26#egg=xblock-poll==1.9.1
xblock-utils==1.2.3
xblock-utils==1.2.4
xblock==1.2.9
xmlsec==1.3.3 # via python3-saml
xss-utils==0.1.2

View File

@@ -127,7 +127,7 @@ edx-oauth2-provider==1.3.1
edx-opaque-keys[django]==2.0.1
edx-organizations==2.2.0
edx-proctoring-proctortrack==1.0.5
edx-proctoring==2.2.2
edx-proctoring==2.2.3
edx-rbac==1.0.5
edx-rest-api-client==1.9.2
edx-search==1.2.2
@@ -223,7 +223,7 @@ pluggy==0.13.1
polib==1.1.0
psutil==1.2.1
py2neo==3.1.2
py==1.8.0
py==1.8.1
pyaml==19.12.0
pycodestyle==2.5.0
pycontracts==1.7.1
@@ -311,7 +311,7 @@ text-unidecode==1.3
tincan==0.0.5
toml==0.10.0
tox-battery==0.5.1
tox==3.14.2
tox==3.14.3
transifex-client==0.13.4
unicodecsv==0.14.1
unidiff==0.5.5
@@ -331,7 +331,7 @@ werkzeug==0.16.0
wrapt==1.10.5
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.6#egg=xblock-drag-and-drop-v2==2.2.6
git+https://github.com/open-craft/xblock-poll@3c7dcaf6c933d914188f0740a60711603f948d26#egg=xblock-poll==1.9.1
xblock-utils==1.2.3
xblock-utils==1.2.4
xblock==1.2.9
xmlsec==1.3.3
xmltodict==0.12.0

View File

@@ -124,7 +124,7 @@ edx-oauth2-provider==1.3.1
edx-opaque-keys[django]==2.0.1
edx-organizations==2.2.0
edx-proctoring-proctortrack==1.0.5
edx-proctoring==2.2.2
edx-proctoring==2.2.3
edx-rbac==1.0.5
edx-rest-api-client==1.9.2
edx-search==1.2.2
@@ -214,7 +214,7 @@ pluggy==0.13.1
polib==1.1.0
psutil==1.2.1
py2neo==3.1.2
py==1.8.0 # via pytest, tox
py==1.8.1 # via pytest, tox
pyaml==19.12.0 # via moto
pycodestyle==2.5.0
pycontracts==1.7.1
@@ -290,7 +290,7 @@ text-unidecode==1.3
tincan==0.0.5
toml==0.10.0 # via tox
tox-battery==0.5.1
tox==3.14.2
tox==3.14.3
transifex-client==0.13.4
unicodecsv==0.14.1
unidiff==0.5.5
@@ -309,7 +309,7 @@ werkzeug==0.16.0 # via moto
wrapt==1.10.5
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.6#egg=xblock-drag-and-drop-v2==2.2.6
git+https://github.com/open-craft/xblock-poll@3c7dcaf6c933d914188f0740a60711603f948d26#egg=xblock-poll==1.9.1
xblock-utils==1.2.3
xblock-utils==1.2.4
xblock==1.2.9
xmlsec==1.3.3
xmltodict==0.12.0 # via moto