Remove django-simple-history and all HistoricalRecords.

This commit is contained in:
John Eskew
2017-10-06 16:26:06 -04:00
parent 0702df51bf
commit 737ebccb74
9 changed files with 5 additions and 38 deletions

View File

@@ -14,7 +14,6 @@ from django.db.models.signals import pre_delete, pre_save
from django.dispatch import receiver
from jsonfield.fields import JSONField
from model_utils.models import TimeStampedModel
from simple_history.models import HistoricalRecords
class Microsite(models.Model):
@@ -115,9 +114,6 @@ class MicrositeOrganizationMapping(models.Model):
organization = models.CharField(max_length=63, db_index=True, unique=True)
microsite = models.ForeignKey(Microsite, db_index=True)
# for archiving
history = HistoricalRecords()
def __unicode__(self):
"""String conversion"""
return u'{microsite_key}: {organization}'.format(
@@ -155,9 +151,6 @@ class MicrositeTemplate(models.Model):
template_uri = models.CharField(max_length=255, db_index=True)
template = models.TextField()
# for archiving
history = HistoricalRecords()
def __unicode__(self):
"""String conversion"""
return u'{microsite_key}: {template_uri}'.format(

View File

@@ -42,7 +42,6 @@ from eventtracking import tracker
from model_utils.models import TimeStampedModel
from opaque_keys.edx.keys import CourseKey
from pytz import UTC
from simple_history.models import HistoricalRecords
from slumber.exceptions import HttpClientError, HttpServerError
import dogstats_wrapper as dog_stats_api
@@ -1027,9 +1026,6 @@ class CourseEnrollment(models.Model):
objects = CourseEnrollmentManager()
# Maintain a history of requirement status updates for auditing purposes
history = HistoricalRecords()
# cache key format e.g enrollment.<username>.<course_key>.mode = 'honor'
COURSE_ENROLLMENT_CACHE_KEY = u"enrollment.{}.{}.mode" # TODO Can this be removed? It doesn't seem to be used.