Skip to content

Commit

Permalink
Made a fix for backwards compatibility with Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
epicserve committed Feb 15, 2016
1 parent 6acea02 commit 6f813fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion categories/templatetags/category_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.apps import apps
from django.template import (Node, TemplateSyntaxError, VariableDoesNotExist)
from django.template.base import FilterExpression
from django.utils.six import string_types
from categories.base import CategoryBase
from categories.models import Category
from mptt.utils import drilldown_tree_for_node
Expand Down Expand Up @@ -30,7 +31,7 @@ def get_cat_model(model):
Return a class from a string or class
"""
try:
if isinstance(model, str):
if isinstance(model, string_types):
model_class = apps.get_model(*model.split("."))
elif issubclass(model, CategoryBase):
model_class = model
Expand Down

0 comments on commit 6f813fd

Please sign in to comment.