Merge pull request #17425 from edx/jmbowman/PLAT-1949

PLAT-1949 Less cluttered management command output
This commit is contained in:
Jeremy Bowman
2018-02-07 16:26:39 -05:00
committed by GitHub
7 changed files with 13 additions and 16 deletions

View File

@@ -3,7 +3,7 @@
from django.conf import settings
from django.contrib import staticfiles
from django.test import TestCase
from path import path # pylint: disable=no-name-in-module
from path import Path
import edxmako
from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme
@@ -37,14 +37,14 @@ class TestComprehensiveTheming(TestCase):
# of test.
# Make a temp directory as a theme.
themes_dir = path(mkdtemp_clean())
themes_dir = Path(mkdtemp_clean())
tmp_theme = "temp_theme"
template_dir = themes_dir / tmp_theme / "lms/templates"
template_dir.makedirs()
with open(template_dir / "footer.html", "w") as footer:
footer.write("<footer>TEMPORARY THEME</footer>")
dest_path = path(settings.COMPREHENSIVE_THEME_DIRS[0]) / tmp_theme
dest_path = Path(settings.COMPREHENSIVE_THEME_DIRS[0]) / tmp_theme
create_symlink(themes_dir / tmp_theme, dest_path)
edxmako.paths.add_lookup('main', themes_dir, prepend=True)

View File

@@ -4,7 +4,6 @@ Views handling read (GET) requests for the Discussion tab and inline discussions
import logging
from functools import wraps
from sets import Set
from django.conf import settings
from django.contrib.auth.decorators import login_required
@@ -727,9 +726,7 @@ class DiscussionBoardFragmentView(EdxFragmentView):
works in conjunction with the Django pipeline to ensure that in development mode
the files are loaded individually, but in production just the single bundle is loaded.
"""
dependencies = Set()
dependencies.update(self.get_js_dependencies('discussion_vendor'))
return list(dependencies)
return list(set(self.get_js_dependencies('discussion_vendor')))
def js_dependencies(self):
"""