Commit 168cb306 by Don Mitchell

Move tz_aware into connection config rather than settings.

Make django use_tz
parent 909fe134
...@@ -23,8 +23,7 @@ MODULESTORE_OPTIONS = { ...@@ -23,8 +23,7 @@ MODULESTORE_OPTIONS = {
'db': 'test_xmodule', 'db': 'test_xmodule',
'collection': 'acceptance_modulestore', 'collection': 'acceptance_modulestore',
'fs_root': TEST_ROOT / "data", 'fs_root': TEST_ROOT / "data",
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'mitxmako.shortcuts.render_to_string'
'tz_aware': True
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -22,8 +22,7 @@ modulestore_options = { ...@@ -22,8 +22,7 @@ modulestore_options = {
'db': 'xmodule', 'db': 'xmodule',
'collection': 'modulestore', 'collection': 'modulestore',
'fs_root': GITHUB_REPO_ROOT, 'fs_root': GITHUB_REPO_ROOT,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'mitxmako.shortcuts.render_to_string'
'tz_aware': True
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -48,8 +48,7 @@ MODULESTORE_OPTIONS = { ...@@ -48,8 +48,7 @@ MODULESTORE_OPTIONS = {
'db': 'test_xmodule', 'db': 'test_xmodule',
'collection': 'test_modulestore', 'collection': 'test_modulestore',
'fs_root': TEST_ROOT / "data", 'fs_root': TEST_ROOT / "data",
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'mitxmako.shortcuts.render_to_string'
'tz_aware': True
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -14,6 +14,7 @@ import sys ...@@ -14,6 +14,7 @@ import sys
import datetime import datetime
import json import json
from pytz import UTC
middleware.MakoMiddleware() middleware.MakoMiddleware()
...@@ -75,7 +76,7 @@ Will log what happened to file.txt. ...@@ -75,7 +76,7 @@ Will log what happened to file.txt.
utg = UserTestGroup() utg = UserTestGroup()
utg.name = group utg.name = group
utg.description = json.dumps({"description": args[2]}, utg.description = json.dumps({"description": args[2]},
{"time": datetime.datetime.utcnow().isoformat()}) {"time": datetime.datetime.now(UTC).isoformat()})
group_objects[group] = utg group_objects[group] = utg
group_objects[group].save() group_objects[group].save()
......
...@@ -8,6 +8,7 @@ from django.conf import settings ...@@ -8,6 +8,7 @@ from django.conf import settings
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand, CommandError
from student.models import TestCenterUser from student.models import TestCenterUser
from pytz import UTC
class Command(BaseCommand): class Command(BaseCommand):
...@@ -58,7 +59,7 @@ class Command(BaseCommand): ...@@ -58,7 +59,7 @@ class Command(BaseCommand):
def handle(self, **options): def handle(self, **options):
# update time should use UTC in order to be comparable to the user_updated_at # update time should use UTC in order to be comparable to the user_updated_at
# field # field
uploaded_at = datetime.utcnow() uploaded_at = datetime.now(UTC)
# if specified destination is an existing directory, then # if specified destination is an existing directory, then
# create a filename for it automatically. If it doesn't exist, # create a filename for it automatically. If it doesn't exist,
......
...@@ -8,6 +8,7 @@ from django.conf import settings ...@@ -8,6 +8,7 @@ from django.conf import settings
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand, CommandError
from student.models import TestCenterRegistration, ACCOMMODATION_REJECTED_CODE from student.models import TestCenterRegistration, ACCOMMODATION_REJECTED_CODE
from pytz import UTC
class Command(BaseCommand): class Command(BaseCommand):
...@@ -51,7 +52,7 @@ class Command(BaseCommand): ...@@ -51,7 +52,7 @@ class Command(BaseCommand):
def handle(self, **options): def handle(self, **options):
# update time should use UTC in order to be comparable to the user_updated_at # update time should use UTC in order to be comparable to the user_updated_at
# field # field
uploaded_at = datetime.utcnow() uploaded_at = datetime.now(UTC)
# if specified destination is an existing directory, then # if specified destination is an existing directory, then
# create a filename for it automatically. If it doesn't exist, # create a filename for it automatically. If it doesn't exist,
......
...@@ -13,6 +13,7 @@ from django.core.management.base import BaseCommand, CommandError ...@@ -13,6 +13,7 @@ from django.core.management.base import BaseCommand, CommandError
from django.conf import settings from django.conf import settings
from student.models import TestCenterUser, TestCenterRegistration from student.models import TestCenterUser, TestCenterRegistration
from pytz import UTC
class Command(BaseCommand): class Command(BaseCommand):
...@@ -80,7 +81,7 @@ class Command(BaseCommand): ...@@ -80,7 +81,7 @@ class Command(BaseCommand):
except ValueError as ve: except ValueError as ve:
Command.datadog_error("Bad AuthorizationID value found for {}: message {}".format(client_authorization_id, ve), eacfile.name) Command.datadog_error("Bad AuthorizationID value found for {}: message {}".format(client_authorization_id, ve), eacfile.name)
registration.confirmed_at = datetime.utcnow() registration.confirmed_at = datetime.now(UTC)
registration.save() registration.save()
except TestCenterRegistration.DoesNotExist: except TestCenterRegistration.DoesNotExist:
Command.datadog_error("Failed to find record for client_auth_id {}".format(client_authorization_id), eacfile.name) Command.datadog_error("Failed to find record for client_auth_id {}".format(client_authorization_id), eacfile.name)
......
...@@ -26,6 +26,7 @@ from django.dispatch import receiver ...@@ -26,6 +26,7 @@ from django.dispatch import receiver
from django.forms import ModelForm, forms from django.forms import ModelForm, forms
import comment_client as cc import comment_client as cc
from pytz import UTC
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -53,7 +54,7 @@ class UserProfile(models.Model): ...@@ -53,7 +54,7 @@ class UserProfile(models.Model):
class Meta: class Meta:
db_table = "auth_userprofile" db_table = "auth_userprofile"
# # CRITICAL TODO/SECURITY # CRITICAL TODO/SECURITY
# Sanitize all fields. # Sanitize all fields.
# This is not visible to other users, but could introduce holes later # This is not visible to other users, but could introduce holes later
user = models.OneToOneField(User, unique=True, db_index=True, related_name='profile') user = models.OneToOneField(User, unique=True, db_index=True, related_name='profile')
...@@ -253,7 +254,7 @@ class TestCenterUserForm(ModelForm): ...@@ -253,7 +254,7 @@ class TestCenterUserForm(ModelForm):
def update_and_save(self): def update_and_save(self):
new_user = self.save(commit=False) new_user = self.save(commit=False)
# create additional values here: # create additional values here:
new_user.user_updated_at = datetime.utcnow() new_user.user_updated_at = datetime.now(UTC)
new_user.upload_status = '' new_user.upload_status = ''
new_user.save() new_user.save()
log.info("Updated demographic information for user's test center exam registration: username \"{}\" ".format(new_user.user.username)) log.info("Updated demographic information for user's test center exam registration: username \"{}\" ".format(new_user.user.username))
...@@ -555,7 +556,7 @@ class TestCenterRegistrationForm(ModelForm): ...@@ -555,7 +556,7 @@ class TestCenterRegistrationForm(ModelForm):
def update_and_save(self): def update_and_save(self):
registration = self.save(commit=False) registration = self.save(commit=False)
# create additional values here: # create additional values here:
registration.user_updated_at = datetime.utcnow() registration.user_updated_at = datetime.now(UTC)
registration.upload_status = '' registration.upload_status = ''
registration.save() registration.save()
log.info("Updated registration information for user's test center exam registration: username \"{}\" course \"{}\", examcode \"{}\"".format(registration.testcenter_user.user.username, registration.course_id, registration.exam_series_code)) log.info("Updated registration information for user's test center exam registration: username \"{}\" course \"{}\", examcode \"{}\"".format(registration.testcenter_user.user.username, registration.course_id, registration.exam_series_code))
...@@ -597,7 +598,7 @@ def unique_id_for_user(user): ...@@ -597,7 +598,7 @@ def unique_id_for_user(user):
return h.hexdigest() return h.hexdigest()
# # TODO: Should be renamed to generic UserGroup, and possibly # TODO: Should be renamed to generic UserGroup, and possibly
# Given an optional field for type of group # Given an optional field for type of group
class UserTestGroup(models.Model): class UserTestGroup(models.Model):
users = models.ManyToManyField(User, db_index=True) users = models.ManyToManyField(User, db_index=True)
......
...@@ -49,6 +49,7 @@ from courseware.views import get_module_for_descriptor, jump_to ...@@ -49,6 +49,7 @@ from courseware.views import get_module_for_descriptor, jump_to
from courseware.model_data import ModelDataCache from courseware.model_data import ModelDataCache
from statsd import statsd from statsd import statsd
from pytz import UTC
log = logging.getLogger("mitx.student") log = logging.getLogger("mitx.student")
Article = namedtuple('Article', 'title url author image deck publication publish_date') Article = namedtuple('Article', 'title url author image deck publication publish_date')
...@@ -668,7 +669,7 @@ def create_account(request, post_override=None): ...@@ -668,7 +669,7 @@ def create_account(request, post_override=None):
if DoExternalAuth: if DoExternalAuth:
eamap.user = login_user eamap.user = login_user
eamap.dtsignup = datetime.datetime.now() eamap.dtsignup = datetime.datetime.now(UTC)
eamap.save() eamap.save()
log.debug('Updated ExternalAuthMap for %s to be %s' % (post_vars['username'], eamap)) log.debug('Updated ExternalAuthMap for %s to be %s' % (post_vars['username'], eamap))
......
...@@ -14,6 +14,7 @@ from mitxmako.shortcuts import render_to_response ...@@ -14,6 +14,7 @@ from mitxmako.shortcuts import render_to_response
from django_future.csrf import ensure_csrf_cookie from django_future.csrf import ensure_csrf_cookie
from track.models import TrackingLog from track.models import TrackingLog
from pytz import UTC
log = logging.getLogger("tracking") log = logging.getLogger("tracking")
...@@ -59,7 +60,7 @@ def user_track(request): ...@@ -59,7 +60,7 @@ def user_track(request):
"event": request.GET['event'], "event": request.GET['event'],
"agent": agent, "agent": agent,
"page": request.GET['page'], "page": request.GET['page'],
"time": datetime.datetime.utcnow().isoformat(), "time": datetime.datetime.now(UTC).isoformat(),
"host": request.META['SERVER_NAME'], "host": request.META['SERVER_NAME'],
} }
log_event(event) log_event(event)
...@@ -85,7 +86,7 @@ def server_track(request, event_type, event, page=None): ...@@ -85,7 +86,7 @@ def server_track(request, event_type, event, page=None):
"event": event, "event": event,
"agent": agent, "agent": agent,
"page": page, "page": page,
"time": datetime.datetime.utcnow().isoformat(), "time": datetime.datetime.now(UTC).isoformat(),
"host": request.META['SERVER_NAME'], "host": request.META['SERVER_NAME'],
} }
......
...@@ -144,11 +144,11 @@ class InputTypeBase(object): ...@@ -144,11 +144,11 @@ class InputTypeBase(object):
self.tag = xml.tag self.tag = xml.tag
self.system = system self.system = system
# # NOTE: ID should only come from one place. If it comes from multiple, # NOTE: ID should only come from one place. If it comes from multiple,
# # we use state first, XML second (in case the xml changed, but we have # we use state first, XML second (in case the xml changed, but we have
# # existing state with an old id). Since we don't make this guarantee, # existing state with an old id). Since we don't make this guarantee,
# # we can swap this around in the future if there's a more logical # we can swap this around in the future if there's a more logical
# # order. # order.
self.input_id = state.get('id', xml.get('id')) self.input_id = state.get('id', xml.get('id'))
if self.input_id is None: if self.input_id is None:
......
...@@ -747,7 +747,7 @@ class CapaModule(CapaFields, XModule): ...@@ -747,7 +747,7 @@ class CapaModule(CapaFields, XModule):
# Problem queued. Students must wait a specified waittime before they are allowed to submit # Problem queued. Students must wait a specified waittime before they are allowed to submit
if self.lcp.is_queued(): if self.lcp.is_queued():
current_time = datetime.datetime.now() current_time = datetime.datetime.now(UTC)
prev_submit_time = self.lcp.get_recentmost_queuetime() prev_submit_time = self.lcp.get_recentmost_queuetime()
waittime_between_requests = self.system.xqueue['waittime'] waittime_between_requests = self.system.xqueue['waittime']
if (current_time - prev_submit_time).total_seconds() < waittime_between_requests: if (current_time - prev_submit_time).total_seconds() < waittime_between_requests:
......
...@@ -93,7 +93,7 @@ class Textbook(object): ...@@ -93,7 +93,7 @@ class Textbook(object):
# see if we already fetched this # see if we already fetched this
if toc_url in _cached_toc: if toc_url in _cached_toc:
(table_of_contents, timestamp) = _cached_toc[toc_url] (table_of_contents, timestamp) = _cached_toc[toc_url]
age = datetime.now() - timestamp age = datetime.now(UTC) - timestamp
# expire every 10 minutes # expire every 10 minutes
if age.seconds < 600: if age.seconds < 600:
return table_of_contents return table_of_contents
......
...@@ -231,6 +231,7 @@ class MongoModuleStore(ModuleStoreBase): ...@@ -231,6 +231,7 @@ class MongoModuleStore(ModuleStoreBase):
self.collection = pymongo.connection.Connection( self.collection = pymongo.connection.Connection(
host=host, host=host,
port=port, port=port,
tz_aware=True,
**kwargs **kwargs
)[db][collection] )[db][collection]
......
...@@ -43,7 +43,7 @@ class TestMongoModuleStore(object): ...@@ -43,7 +43,7 @@ class TestMongoModuleStore(object):
def initdb(): def initdb():
# connect to the db # connect to the db
store = MongoModuleStore(HOST, DB, COLLECTION, FS_ROOT, RENDER_TEMPLATE, store = MongoModuleStore(HOST, DB, COLLECTION, FS_ROOT, RENDER_TEMPLATE,
default_class=DEFAULT_CLASS, tz_aware=True) default_class=DEFAULT_CLASS)
# Explicitly list the courses to load (don't want the big one) # Explicitly list the courses to load (don't want the big one)
courses = ['toy', 'simple'] courses = ['toy', 'simple']
import_from_xml(store, DATA_DIR, courses) import_from_xml(store, DATA_DIR, courses)
......
...@@ -18,6 +18,7 @@ from xmodule.modulestore import Location ...@@ -18,6 +18,7 @@ from xmodule.modulestore import Location
from django.http import QueryDict from django.http import QueryDict
from . import test_system from . import test_system
from pytz import UTC
class CapaFactory(object): class CapaFactory(object):
...@@ -126,7 +127,7 @@ class CapaFactory(object): ...@@ -126,7 +127,7 @@ class CapaFactory(object):
class CapaModuleTest(unittest.TestCase): class CapaModuleTest(unittest.TestCase):
def setUp(self): def setUp(self):
now = datetime.datetime.now() now = datetime.datetime.now(UTC)
day_delta = datetime.timedelta(days=1) day_delta = datetime.timedelta(days=1)
self.yesterday_str = str(now - day_delta) self.yesterday_str = str(now - day_delta)
self.today_str = str(now) self.today_str = str(now)
...@@ -475,12 +476,12 @@ class CapaModuleTest(unittest.TestCase): ...@@ -475,12 +476,12 @@ class CapaModuleTest(unittest.TestCase):
# Simulate that the problem is queued # Simulate that the problem is queued
with patch('capa.capa_problem.LoncapaProblem.is_queued') \ with patch('capa.capa_problem.LoncapaProblem.is_queued') \
as mock_is_queued,\ as mock_is_queued, \
patch('capa.capa_problem.LoncapaProblem.get_recentmost_queuetime') \ patch('capa.capa_problem.LoncapaProblem.get_recentmost_queuetime') \
as mock_get_queuetime: as mock_get_queuetime:
mock_is_queued.return_value = True mock_is_queued.return_value = True
mock_get_queuetime.return_value = datetime.datetime.now() mock_get_queuetime.return_value = datetime.datetime.now(UTC)
get_request_dict = {CapaFactory.input_key(): '3.14'} get_request_dict = {CapaFactory.input_key(): '3.14'}
result = module.check_problem(get_request_dict) result = module.check_problem(get_request_dict)
......
...@@ -12,6 +12,7 @@ from courseware.models import StudentModule, XModuleContentField, XModuleSetting ...@@ -12,6 +12,7 @@ from courseware.models import StudentModule, XModuleContentField, XModuleSetting
from courseware.models import XModuleStudentInfoField, XModuleStudentPrefsField from courseware.models import XModuleStudentInfoField, XModuleStudentPrefsField
from xmodule.modulestore import Location from xmodule.modulestore import Location
from pytz import UTC
location = partial(Location, 'i4x', 'edX', 'test_course', 'problem') location = partial(Location, 'i4x', 'edX', 'test_course', 'problem')
...@@ -28,8 +29,8 @@ class RegistrationFactory(StudentRegistrationFactory): ...@@ -28,8 +29,8 @@ class RegistrationFactory(StudentRegistrationFactory):
class UserFactory(StudentUserFactory): class UserFactory(StudentUserFactory):
email = 'robot@edx.org' email = 'robot@edx.org'
last_name = 'Tester' last_name = 'Tester'
last_login = datetime.now() last_login = datetime.now(UTC)
date_joined = datetime.now() date_joined = datetime.now(UTC)
class GroupFactory(StudentGroupFactory): class GroupFactory(StudentGroupFactory):
......
...@@ -65,8 +65,7 @@ def mongo_store_config(data_dir): ...@@ -65,8 +65,7 @@ def mongo_store_config(data_dir):
'db': 'test_xmodule', 'db': 'test_xmodule',
'collection': 'modulestore_%s' % uuid4().hex, 'collection': 'modulestore_%s' % uuid4().hex,
'fs_root': data_dir, 'fs_root': data_dir,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'mitxmako.shortcuts.render_to_string'
'tz_aware': True
} }
} }
} }
......
...@@ -219,7 +219,7 @@ def initialize_discussion_info(course): ...@@ -219,7 +219,7 @@ def initialize_discussion_info(course):
_DISCUSSIONINFO[course.id]['id_map'] = discussion_id_map _DISCUSSIONINFO[course.id]['id_map'] = discussion_id_map
_DISCUSSIONINFO[course.id]['category_map'] = category_map _DISCUSSIONINFO[course.id]['category_map'] = category_map
_DISCUSSIONINFO[course.id]['timestamp'] = datetime.now() _DISCUSSIONINFO[course.id]['timestamp'] = datetime.now(UTC())
class JsonResponse(HttpResponse): class JsonResponse(HttpResponse):
......
...@@ -13,6 +13,7 @@ from foldit.models import PuzzleComplete, Score ...@@ -13,6 +13,7 @@ from foldit.models import PuzzleComplete, Score
from student.models import UserProfile, unique_id_for_user from student.models import UserProfile, unique_id_for_user
from datetime import datetime, timedelta from datetime import datetime, timedelta
from pytz import UTC
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -28,7 +29,7 @@ class FolditTestCase(TestCase): ...@@ -28,7 +29,7 @@ class FolditTestCase(TestCase):
self.user2 = User.objects.create_user('testuser2', 'test2@test.com', pwd) self.user2 = User.objects.create_user('testuser2', 'test2@test.com', pwd)
self.unique_user_id = unique_id_for_user(self.user) self.unique_user_id = unique_id_for_user(self.user)
self.unique_user_id2 = unique_id_for_user(self.user2) self.unique_user_id2 = unique_id_for_user(self.user2)
now = datetime.now() now = datetime.now(UTC)
self.tomorrow = now + timedelta(days=1) self.tomorrow = now + timedelta(days=1)
self.yesterday = now - timedelta(days=1) self.yesterday = now - timedelta(days=1)
......
...@@ -18,6 +18,7 @@ from django.core.management.base import BaseCommand ...@@ -18,6 +18,7 @@ from django.core.management.base import BaseCommand
from student.models import UserProfile, Registration from student.models import UserProfile, Registration
from external_auth.models import ExternalAuthMap from external_auth.models import ExternalAuthMap
from django.contrib.auth.models import User, Group from django.contrib.auth.models import User, Group
from pytz import UTC
class MyCompleter(object): # Custom completer class MyCompleter(object): # Custom completer
...@@ -124,7 +125,7 @@ class Command(BaseCommand): ...@@ -124,7 +125,7 @@ class Command(BaseCommand):
external_credentials=json.dumps(credentials), external_credentials=json.dumps(credentials),
) )
eamap.user = user eamap.user = user
eamap.dtsignup = datetime.datetime.now() eamap.dtsignup = datetime.datetime.now(UTC)
eamap.save() eamap.save()
print "User %s created successfully!" % user print "User %s created successfully!" % user
......
...@@ -15,6 +15,7 @@ from scipy.optimize import curve_fit ...@@ -15,6 +15,7 @@ from scipy.optimize import curve_fit
from django.conf import settings from django.conf import settings
from django.db.models import Sum, Max from django.db.models import Sum, Max
from psychometrics.models import * from psychometrics.models import *
from pytz import UTC
log = logging.getLogger("mitx.psychometrics") log = logging.getLogger("mitx.psychometrics")
...@@ -340,7 +341,7 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key): ...@@ -340,7 +341,7 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key):
checktimes = eval(pmd.checktimes) # update log of attempt timestamps checktimes = eval(pmd.checktimes) # update log of attempt timestamps
except: except:
checktimes = [] checktimes = []
checktimes.append(datetime.datetime.now()) checktimes.append(datetime.datetime.now(UTC))
pmd.checktimes = checktimes pmd.checktimes = checktimes
try: try:
pmd.save() pmd.save()
......
...@@ -11,6 +11,7 @@ from markdown import markdown ...@@ -11,6 +11,7 @@ from markdown import markdown
from .wiki_settings import * from .wiki_settings import *
from util.cache import cache from util.cache import cache
from pytz import UTC
class ShouldHaveExactlyOneRootSlug(Exception): class ShouldHaveExactlyOneRootSlug(Exception):
...@@ -265,7 +266,7 @@ class Revision(models.Model): ...@@ -265,7 +266,7 @@ class Revision(models.Model):
return return
else: else:
import datetime import datetime
self.article.modified_on = datetime.datetime.now() self.article.modified_on = datetime.datetime.now(UTC)
self.article.save() self.article.save()
# Increment counter according to previous revision # Increment counter according to previous revision
......
...@@ -24,8 +24,7 @@ modulestore_options = { ...@@ -24,8 +24,7 @@ modulestore_options = {
'db': 'test_xmodule', 'db': 'test_xmodule',
'collection': 'acceptance_modulestore', 'collection': 'acceptance_modulestore',
'fs_root': TEST_ROOT / "data", 'fs_root': TEST_ROOT / "data",
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'mitxmako.shortcuts.render_to_string'
'tz_aware': True
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -21,8 +21,7 @@ modulestore_options = { ...@@ -21,8 +21,7 @@ modulestore_options = {
'db': 'xmodule', 'db': 'xmodule',
'collection': 'modulestore', 'collection': 'modulestore',
'fs_root': DATA_DIR, 'fs_root': DATA_DIR,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'mitxmako.shortcuts.render_to_string'
'tz_aware': True
} }
MODULESTORE = { MODULESTORE = {
......
...@@ -308,6 +308,7 @@ import monitoring.exceptions # noqa ...@@ -308,6 +308,7 @@ import monitoring.exceptions # noqa
# Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here # Change DEBUG/TEMPLATE_DEBUG in your environment settings files, not here
DEBUG = False DEBUG = False
TEMPLATE_DEBUG = False TEMPLATE_DEBUG = False
USE_TZ = True
# Site info # Site info
SITE_ID = 1 SITE_ID = 1
......
...@@ -19,8 +19,7 @@ MODULESTORE = { ...@@ -19,8 +19,7 @@ MODULESTORE = {
'db': 'xmodule', 'db': 'xmodule',
'collection': 'modulestore', 'collection': 'modulestore',
'fs_root': GITHUB_REPO_ROOT, 'fs_root': GITHUB_REPO_ROOT,
'render_template': 'mitxmako.shortcuts.render_to_string', 'render_template': 'mitxmako.shortcuts.render_to_string'
'tz_aware': True
} }
} }
} }
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