Migrating common/djangoapps/course_action_state
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
"""
|
||||
Model Managers for Course Actions
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
import six
|
||||
import traceback
|
||||
|
||||
from django.db import models, transaction
|
||||
|
||||
|
||||
@@ -88,7 +89,7 @@ class CourseActionUIStateManager(CourseActionStateManager):
|
||||
|
||||
# update any additional fields in kwargs
|
||||
if kwargs:
|
||||
for key, value in kwargs.iteritems():
|
||||
for key, value in six.iteritems(kwargs):
|
||||
setattr(state_object, key, value)
|
||||
|
||||
state_object.save()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -9,10 +9,10 @@ file and check it in at the same time as your model changes. To do that,
|
||||
3. It adds the migration file to edx-platform/common/djangoapps/course_action_state/migrations/
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
from opaque_keys.edx.django.models import CourseKeyField
|
||||
|
||||
from course_action_state.managers import CourseActionStateManager, CourseRerunUIStateManager
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
"""
|
||||
Tests for basic common operations related to Course Action State managers
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from six.moves import range
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
from ddt import data, ddt
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Tests specific to the CourseRerunState Model and Manager.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.test import TestCase
|
||||
from opaque_keys.edx.locations import CourseLocator
|
||||
from six import text_type
|
||||
|
||||
Reference in New Issue
Block a user