Update some direct model importing to use Django's apps.get_model instead.

This commit is contained in:
Roberto Rosario
2016-10-30 02:46:36 -04:00
parent aca0491941
commit 24ef702e9c
13 changed files with 60 additions and 25 deletions
+4 -2
View File
@@ -1,10 +1,12 @@
from __future__ import unicode_literals
from django.db.models import get_model
from django.apps import apps
def launch_workflow(sender, instance, created, **kwargs):
Workflow = get_model('document_states', 'Workflow')
Workflow = apps.get_model(
app_label='document_states', model_name='Workflow'
)
if created:
Workflow.objects.launch_for(instance)