Commit c730d43d by Will Daly

Resolved import conflict involving django-staticfiles

(lettuce assumes we are using django.contrib.staticfiles).
This allows us to run the django-admin.py harvest test server,
instead of launching the server ourselves.
parent ca1aeb5b
......@@ -9,6 +9,21 @@ from django.conf import settings
from lms import one_time_startup
from cms import one_time_startup
# There is an import issue when using django-staticfiles with lettuce
# Lettuce assumes that we are using django.contrib.staticfiles,
# but the rest of the app assumes we are using django-staticfiles
# (in particular, django-pipeline and our mako implementation)
# To resolve this, we check whether staticfiles is installed,
# then redirect imports for django.contrib.staticfiles
# to use staticfiles.
try:
import staticfiles
except ImportError:
pass
else:
import sys
sys.modules['django.contrib.staticfiles'] = staticfiles
logger = getLogger(__name__)
logger.info("Loading the lettuce acceptance testing terrain file...")
......
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