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 | 442b4ebad8b2b33ec53a18b089282b4035f8f570 (patch) | |
tree | 7a2da513e3bad2571a4f89a431ec32a624de3d9d /tagging/templatetags/tagging_tags.py | |
parent | 2e528690df8792b2e70248ce18712ca653ede12b (diff) | |
parent | d888d155344e1a000fd79b6869fbd5634b1cf2cb (diff) | |
download | python-django-tagging-442b4ebad8b2b33ec53a18b089282b4035f8f570.tar python-django-tagging-442b4ebad8b2b33ec53a18b089282b4035f8f570.tar.gz |
record new upstream branch created by importing python-django-tagging_0.4.1.orig.tar.gz and merge it
Diffstat (limited to 'tagging/templatetags/tagging_tags.py')
-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') % |