diff options
author | Christopher Baines <mail@cbaines.net> | 2016-03-20 16:35:39 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2016-03-20 16:35:39 +0000 |
commit | d888d155344e1a000fd79b6869fbd5634b1cf2cb (patch) | |
tree | 656b346e97dc33b42641fb5672ca520fedec3c93 /tagging/templatetags | |
parent | d65aa3c3c146b12548a54c894060bce9a8715ad2 (diff) | |
download | python-django-tagging-d888d155344e1a000fd79b6869fbd5634b1cf2cb.tar python-django-tagging-d888d155344e1a000fd79b6869fbd5634b1cf2cb.tar.gz |
Import python-django-tagging_0.4.1.orig.tar.gzupstream/0.4.1upstream
Diffstat (limited to 'tagging/templatetags')
-rw-r--r-- | tagging/templatetags/tagging_tags.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tagging/templatetags/tagging_tags.py b/tagging/templatetags/tagging_tags.py index bd38b30..4e179fb 100644 --- a/tagging/templatetags/tagging_tags.py +++ b/tagging/templatetags/tagging_tags.py @@ -5,7 +5,7 @@ from django.template import Node from django.template import Library from django.template import Variable from django.template import TemplateSyntaxError -from django.db.models import get_model +from django.apps.registry import apps from django.utils.translation import ugettext as _ from tagging.utils import LINEAR @@ -24,7 +24,7 @@ class TagsForModelNode(Node): self.counts = counts def render(self, context): - model = get_model(*self.model.split('.')) + model = apps.get_model(*self.model.split('.')) if model is None: raise TemplateSyntaxError( _('tags_for_model tag was given an invalid model: %s') % @@ -41,7 +41,7 @@ class TagCloudForModelNode(Node): self.kwargs = kwargs def render(self, context): - model = get_model(*self.model.split('.')) + model = apps.get_model(*self.model.split('.')) if model is None: raise TemplateSyntaxError( _('tag_cloud_for_model tag was given an invalid model: %s') % @@ -69,7 +69,7 @@ class TaggedObjectsNode(Node): self.model = model def render(self, context): - model = get_model(*self.model.split('.')) + model = apps.get_model(*self.model.split('.')) if model is None: raise TemplateSyntaxError( _('tagged_objects tag was given an invalid model: %s') % |