Commit 45d6f97e by bmedx

Clean up autodiscover

parent d91a634d
...@@ -2,11 +2,11 @@ from django.conf import settings ...@@ -2,11 +2,11 @@ from django.conf import settings
from django.conf.urls import include, patterns, url from django.conf.urls import include, patterns, url
from django.conf.urls.static import static from django.conf.urls.static import static
from django.contrib import admin as django_admin from django.contrib import admin as django_admin
from ratelimitbackend import admin from ratelimitbackend import admin
from cms.djangoapps.contentstore.views.organization import OrganizationListView from cms.djangoapps.contentstore.views.organization import OrganizationListView
django_admin.autodiscover() django_admin.autodiscover()
# Pattern to match a course key or a library key # Pattern to match a course key or a library key
......
...@@ -6,9 +6,10 @@ from config_models.views import ConfigurationModelCurrentAPIView ...@@ -6,9 +6,10 @@ from config_models.views import ConfigurationModelCurrentAPIView
from django.conf import settings from django.conf import settings
from django.conf.urls import include, patterns, url from django.conf.urls import include, patterns, url
from django.conf.urls.static import static from django.conf.urls.static import static
from django.contrib.admin import autodiscover as django_autodiscover
from django.views.generic.base import RedirectView from django.views.generic.base import RedirectView
from ratelimitbackend import admin from ratelimitbackend import admin
from django.contrib.admin import autodiscover as django_autodiscover
from courseware.views.index import CoursewareIndex from courseware.views.index import CoursewareIndex
from courseware.views.views import CourseTabView, EnrollStaffView, StaticCourseTabView from courseware.views.views import CourseTabView, EnrollStaffView, StaticCourseTabView
from django_comment_common.models import ForumsConfig from django_comment_common.models import ForumsConfig
...@@ -20,7 +21,8 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ ...@@ -20,7 +21,8 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
from openedx.features.enterprise_support.api import enterprise_enabled from openedx.features.enterprise_support.api import enterprise_enabled
django_autodiscover() if settings.DEBUG or settings.FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'):
django_autodiscover()
# Use urlpatterns formatted as within the Django docs with first parameter "stuck" to the open parenthesis # Use urlpatterns formatted as within the Django docs with first parameter "stuck" to the open parenthesis
urlpatterns = ( urlpatterns = (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment