[Python-modules-commits] [django-celery] 02/04: Fix get_model with Django 1.9
Brian May
bam at moszumanska.debian.org
Sat Jan 9 07:34:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch master
in repository django-celery.
commit b1488a7aaa79825d44219d52c104011bc100d81f
Author: Brian May <bam at debian.org>
Date: Sat Jan 9 18:21:35 2016 +1100
Fix get_model with Django 1.9
---
tests/someapp/tasks.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/someapp/tasks.py b/tests/someapp/tasks.py
index ed480b4..1c519dd 100644
--- a/tests/someapp/tasks.py
+++ b/tests/someapp/tasks.py
@@ -1,6 +1,6 @@
from celery.task import task
-from django.db.models import get_model
+from django.apps import apps
@task(name='c.unittest.SomeAppTask')
@@ -10,6 +10,6 @@ def SomeAppTask(**kwargs):
@task(name='c.unittest.SomeModelTask')
def SomeModelTask(pk):
- model = get_model('someapp', 'Thing')
+ model = apps.get_model('someapp', 'Thing')
thing = model.objects.get(pk=pk)
return thing.name
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-celery.git
More information about the Python-modules-commits
mailing list