0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 03:31:04 +01:00

Improved implementation of usage_count_enabled

Thanks to @gasman for spotting
This commit is contained in:
Karl Hobley 2014-07-31 12:19:09 +01:00
parent 1ac807ce09
commit de70f2ab89

View File

@ -126,9 +126,4 @@ def hook_output(hook_name):
@register.assignment_tag
def usage_count_enabled():
if hasattr(
settings, 'WAGTAIL_USAGE_COUNT_ENABLED'
) and settings.WAGTAIL_USAGE_COUNT_ENABLED:
return True
else:
return False
return getattr(settings, 'WAGTAIL_USAGE_COUNT_ENABLED', False)