Change deprecated import of get_model.

This commit is contained in:
Roberto Rosario
2015-07-12 02:58:04 -04:00
parent 53c631b505
commit c2a0990e57
3 changed files with 6 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
from __future__ import unicode_literals
from django.db import models
from django.apps import apps
from django.utils.translation import ugettext_lazy as _
from actstream import action
@@ -23,7 +23,7 @@ class Event(object):
self.__class__._labels[name] = label
def commit(self, actor=None, action_object=None, target=None):
model = models.get_model('events', 'EventType')
model = apps.get_model('events', 'EventType')
if not self.event_type:
self.event_type, created = model.objects.get_or_create(name=self.name)