diff --git a/cookbook/templatetags/__init__.py b/cookbook/templatetags/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/cookbook/templatetags/theming_tags.py b/cookbook/templatetags/theming_tags.py index 9172c9b67..8da775c24 100644 --- a/cookbook/templatetags/theming_tags.py +++ b/cookbook/templatetags/theming_tags.py @@ -1,7 +1,6 @@ +from cookbook.models import UserPreference from django import template from django.templatetags.static import static - -from cookbook.models import UserPreference from recipes.settings import STICKY_NAV_PREF_DEFAULT register = template.Library() @@ -33,7 +32,7 @@ def nav_color(request): @register.simple_tag def sticky_nav(request): if (not request.user.is_authenticated and STICKY_NAV_PREF_DEFAULT) or \ - (request.user.is_authenticated and request.user.userpreference.sticky_navbar): + (request.user.is_authenticated and request.user.userpreference.sticky_navbar): # noqa: E501 return 'position: sticky; top: 0; left: 0; z-index: 1000;' else: return ''