-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from edx/efischer/django_upgrade
Prep for django 1.11
- Loading branch information
Showing
12 changed files
with
85 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,27 @@ | |
DEBUG = True | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
# The variable doesn't seem to actually get interpolated in | ||
TEMPLATE_STRING_IF_INVALID = "<MISSING VARIABLE '%s'>" | ||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'DIRS': [ | ||
os.path.join(BASE_DIR, 'workbench', 'templates'), | ||
os.path.join(BASE_DIR, 'sample_xblocks' ,'basic', 'templates'), | ||
], | ||
'APP_DIRS': True, | ||
'OPTIONS': { | ||
'context_processors': [ | ||
'django.contrib.auth.context_processors.auth', | ||
'django.template.context_processors.debug', | ||
'django.template.context_processors.i18n', | ||
'django.template.context_processors.media', | ||
'django.template.context_processors.static', | ||
'django.template.context_processors.tz', | ||
'django.contrib.messages.context_processors.messages', | ||
], | ||
}, | ||
}, | ||
] | ||
|
||
ADMINS = ( | ||
# ('Your Name', '[email protected]'), | ||
|
@@ -97,13 +116,6 @@ | |
# Make this unique, and don't share it with anybody. | ||
SECRET_KEY = '5ftdd9(@p)tg&bqv$(^d!63psz9+g+_i5om_e%!32%po2_+%l7' | ||
|
||
# List of callables that know how to import templates from various sources. | ||
TEMPLATE_LOADERS = ( | ||
'django.template.loaders.filesystem.Loader', | ||
'django.template.loaders.app_directories.Loader', | ||
# 'django.template.loaders.eggs.Loader', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
'django.middleware.common.CommonMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
|
@@ -120,8 +132,6 @@ | |
WSGI_APPLICATION = 'workbench.wsgi.application' | ||
|
||
TEMPLATE_DIRS = ( | ||
os.path.join(BASE_DIR, 'workbench/templates'), | ||
os.path.join(BASE_DIR, 'sample_xblocks/basic/templates'), | ||
) | ||
|
||
INSTALLED_APPS = ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,65 @@ | ||
"""Provide XBlock urls""" | ||
|
||
from django.conf.urls import include, patterns, url | ||
from django.conf.urls import include, url | ||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns | ||
from django.contrib import admin | ||
|
||
from workbench import views | ||
|
||
admin.autodiscover() | ||
|
||
urlpatterns = patterns( | ||
'workbench.views', | ||
url(r'^$', 'index', name='workbench_index'), | ||
urlpatterns = [ | ||
url(r'^$', views.index, name='workbench_index'), | ||
url( | ||
r'^scenario/(?P<scenario_id>[^/]+)/(?P<view_name>[^/]+)/$', | ||
'show_scenario', | ||
views.show_scenario, | ||
name='scenario' | ||
), | ||
url(r'^userlist/$', | ||
'user_list', | ||
views.user_list, | ||
name='userlist'), | ||
url( | ||
r'^scenario/(?P<scenario_id>[^/]+)/$', | ||
'show_scenario', | ||
views.show_scenario, | ||
name='workbench_show_scenario' | ||
), | ||
url( | ||
r'^view/(?P<scenario_id>[^/]+)/(?P<view_name>[^/]+)/$', | ||
'show_scenario', | ||
views.show_scenario, | ||
{'template': 'workbench/blockview.html'} | ||
), | ||
url( | ||
r'^view/(?P<scenario_id>[^/]+)/$', | ||
'show_scenario', | ||
views.show_scenario, | ||
{'template': 'workbench/blockview.html'} | ||
), | ||
url( | ||
r'^handler/(?P<usage_id>[^/]+)/(?P<handler_slug>[^/]*)(?:/(?P<suffix>.*))?$', | ||
'handler', {'authenticated': True}, | ||
views.handler, {'authenticated': True}, | ||
name='handler' | ||
), | ||
url( | ||
r'^aside_handler/(?P<aside_id>[^/]+)/(?P<handler_slug>[^/]*)(?:/(?P<suffix>.*))?$', | ||
'aside_handler', {'authenticated': True}, | ||
views.aside_handler, {'authenticated': True}, | ||
name='aside_handler' | ||
), | ||
url( | ||
r'^unauth_handler/(?P<usage_id>[^/]+)/(?P<handler_slug>[^/]*)(?:/(?P<suffix>.*))?$', | ||
'handler', {'authenticated': False}, | ||
views.handler, {'authenticated': False}, | ||
name='unauth_handler' | ||
), | ||
url( | ||
r'^resource/(?P<block_type>[^/]+)/(?P<resource>.*)$', | ||
'package_resource', | ||
views.package_resource, | ||
name='package_resource' | ||
), | ||
url( | ||
r'^reset_state$', | ||
'reset_state', | ||
views.reset_state, | ||
name='reset_state' | ||
), | ||
|
||
url(r'^admin/', include(admin.site.urls)), | ||
) | ||
] | ||
|
||
urlpatterns += staticfiles_urlpatterns() |