Commit be062b4f by Bill DeRusha Committed by GitHub

Merge pull request #209 from edx/bderusha/docker-static-target

Swap out memcached backend
parents fce3b10f 3ae64d5c
......@@ -24,7 +24,7 @@ before_install:
install:
- pip install -U pip wheel codecov
- pip install -r requirements/test.txt
- make requirement.js
- make requirements.js
before_script:
# Give Elasticsearch time to start
......
......@@ -21,7 +21,7 @@ help:
@echo " quality run PEP8 and Pylint"
@echo " production-requirements install requirements for production"
@echo " requirements install requirements for local development"
@echo " requirement.js install JS requirements for local development and production"
@echo " requirements.js install JS requirements for local development and production"
@echo " test run tests and generate coverage report"
@echo " validate run tests and quality checks"
@echo " static gather all static assets for production"
......@@ -31,6 +31,9 @@ help:
@echo ""
static:
$(NODE_BIN)/r.js -o build.js
python manage.py collectstatic --noinput
python manage.py compress -v0 --force
clean_static:
rm -rf course_discovery/assets/ course_discovery/static/build/
......@@ -39,7 +42,7 @@ clean:
find . -name '*.pyc' -delete
coverage erase
requirement.js:
requirements.js:
npm install
$(NODE_BIN)/bower install
......
import unittest
from django.core.urlresolvers import reverse
from django.forms import model_to_dict
......@@ -8,7 +7,6 @@ from course_discovery.apps.publisher.models import Course, CourseRun, Seat
from course_discovery.apps.publisher.tests import factories
@unittest.skip('Compression is broken.')
class CreateUpdateCourseViewTests(TestCase):
""" Tests for the publisher `CreateCourseView` and `UpdateCourseView`. """
......@@ -57,7 +55,6 @@ class CreateUpdateCourseViewTests(TestCase):
self.assertEqual(course.title, updated_course_title)
@unittest.skip('Compression is broken.')
class CreateUpdateCourseRunViewTests(TestCase):
""" Tests for the publisher `CreateCourseRunView` and `UpdateCourseRunView`. """
......@@ -112,7 +109,6 @@ class CreateUpdateCourseRunViewTests(TestCase):
self.assertEqual(course_run.lms_course_id, updated_lms_course_id)
@unittest.skip('Compression is broken.')
class SeatsCreateUpdateViewTests(TestCase):
""" Tests for the publisher `CreateSeatView` and `UpdateSeatView`. """
......
......@@ -143,14 +143,9 @@ COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
# Enable offline compression of CSS/JS
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
# Minify CSS
COMPRESS_CSS_FILTERS = [
'compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.CSSMinFilter',
]
# TEMPLATE CONFIGURATION
......@@ -354,9 +349,4 @@ HAYSTACK_CONNECTIONS = {
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
DEFAULT_PARTNER_ID = None
......@@ -57,3 +57,12 @@ for override, value in DB_OVERRIDES.items():
# NOTE (CCB): Treat all MySQL warnings as exceptions. This is especially
# desired for truncation warnings, which hide potential data integrity issues.
warnings.filterwarnings('error', category=MySQLdb.Warning)
# Minify CSS
COMPRESS_CSS_FILTERS += [
'compressor.filters.cssmin.CSSMinFilter',
]
# Enable offline compression of CSS/JS
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
......@@ -44,3 +44,7 @@ EDX_DRF_EXTENSIONS = {
}
DEFAULT_PARTNER_ID = 1
# Enable offline compression of CSS/JS
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
......@@ -31,8 +31,7 @@ services:
image: edxops/course-discovery:latest
# Uncomment the next two lines to build from a local configuration repo
#build: ../configuration
#dockerfile: docker/build/discovery/Dockerfile
# build: ../configuration/docker/build/discovery/
container_name: course-discovery
volumes:
......
cryptography==1.4
django==1.8.14
django-extensions==1.6.7
django-compressor==2.0
django-filter==0.13.0
django-guardian==1.4.4
django-haystack==2.4.1
......
......@@ -9,4 +9,4 @@ transifex-client==0.11
git+https://github.com/edx/i18n-tools.git@v0.1.4#egg=i18n_tools==0.1.4
# docker devstack
docker-compose >=1.5.1,<1.6.0
docker-compose>=1.7.1,<2.0.0
......@@ -7,5 +7,5 @@ gunicorn==19.6.0
mysqlclient==1.3.7
newrelic==2.66.0.49
nodeenv==0.13.6
pylibmc==1.5.1
python-memcached==1.58
PyYAML==3.11
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