From 5d8aade8e761bcb974274a4cbfabb6c1bf0af06e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 16:57:09 -0500 Subject: [PATCH] Explain django settings imports --- common/lib/xmodule/xmodule/open_ended_image_submission.py | 4 ++++ common/lib/xmodule/xmodule/peer_grading_service.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/open_ended_image_submission.py b/common/lib/xmodule/xmodule/open_ended_image_submission.py index cda6cb062a..bc82cdfea0 100644 --- a/common/lib/xmodule/xmodule/open_ended_image_submission.py +++ b/common/lib/xmodule/xmodule/open_ended_image_submission.py @@ -13,6 +13,10 @@ from urlparse import urlparse import requests from boto.s3.connection import S3Connection from boto.s3.key import Key +#TODO: Settings import is needed now in order to specify the URL and keys for amazon s3 (to upload images). +#Eventually, the goal is to replace the global django settings import with settings specifically +#for this module. There is no easy way to do this now, so piggybacking on the django settings +#makes sense. from django.conf import settings import pickle import logging diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 064d0a72a0..2f01abdd44 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -4,8 +4,11 @@ import requests from requests.exceptions import RequestException, ConnectionError, HTTPError import sys +#TODO: Settings import is needed now in order to specify the URL where to find the peer grading service. +#Eventually, the goal is to replace the global django settings import with settings specifically +#for this xmodule. There is no easy way to do this now, so piggybacking on the django settings +#makes sense. from django.conf import settings -from django.http import HttpResponse, Http404 from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError from lxml import etree