Skip to content

Commit

Permalink
Remove CONTENT_DATA_URL serving learningequality#4813
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Bach committed Sep 29, 2016
1 parent e9d0c3d commit c5470d4
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 17 deletions.
9 changes: 0 additions & 9 deletions kalite/distributed/cherrypyserver.py
Expand Up @@ -163,15 +163,6 @@ def start(self):
)
cherrypy.tree.mount(static_handler, settings.STATIC_URL)

# Serve the static files
static_handler = cherrypy.tools.staticdir.handler(
section="/",
dir=os.path.split(settings.CONTENT_DATA_PATH)[1],
root=os.path.abspath(os.path.split(settings.CONTENT_DATA_PATH)[0]),
content_types=WELL_KNOWN_CONTENT_TYPES,
)
cherrypy.tree.mount(static_handler, settings.CONTENT_DATA_URL)

# Serve the static admin media. From django's internal (django.core.servers.basehttp)
admin_static_dir = os.path.join(django.__path__[0], 'contrib', 'admin', 'static')
admin_static_handler = cherrypy.tools.staticdir.handler(
Expand Down
1 change: 0 additions & 1 deletion kalite/distributed/middleware.py
Expand Up @@ -22,7 +22,6 @@ def process_request(self, request):
not request.path.startswith("/api/") and
not request.path.startswith("/securesync/api/user/status") and
not request.path.startswith("/securesync/api/user/login") and
not request.path.startswith(settings.CONTENT_DATA_URL) and
not request.path.startswith(settings.STATIC_URL) and
not request.GET.get('login', '') == 'True'
):
Expand Down
3 changes: 0 additions & 3 deletions kalite/distributed/urls.py
Expand Up @@ -47,9 +47,6 @@
url(r'^%s(?P<path>.*)$' % settings.CONTENT_URL[1:], 'django.views.static.serve', {
'document_root': settings.CONTENT_ROOT,
}),
url(r'^%s(?P<path>.*)$' % settings.CONTENT_DATA_URL[1:], 'django.views.static.serve', {
'document_root': settings.CONTENT_DATA_PATH,
}),
url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
Expand Down
2 changes: 0 additions & 2 deletions kalite/settings/base.py
Expand Up @@ -210,8 +210,6 @@

CONTENT_DATA_PATH = getattr(local_settings, "CONTENT_DATA_PATH", _data_path_channels)

CONTENT_DATA_URL = getattr(local_settings, "CONTENT_DATA_URL", "/data/")

###################################################
# USER DATA
###################################################
Expand Down
2 changes: 0 additions & 2 deletions kalite/topic_tools/settings.py
Expand Up @@ -20,8 +20,6 @@

CHANNEL = getattr(settings, "CHANNEL", "khan")

CHANNEL_DATA_PATH = os.path.join(settings.CONTENT_DATA_PATH, CHANNEL)

KHAN_EXERCISES_DIRPATH = os.path.join(settings.STATIC_ROOT, "js", "distributed", "perseus", "ke")

TOPIC_RECOMMENDATION_DEPTH = 3

0 comments on commit c5470d4

Please sign in to comment.