Skip to content

Commit

Permalink
Merge 2c6fcee into 63a43de
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatohater committed Feb 1, 2015
2 parents 63a43de + 2c6fcee commit 29c0e33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions unfriendly/settings.py
Expand Up @@ -3,6 +3,11 @@

from django.conf import settings

#
# UNFRIENDLY_ENABLE or disable
#
UNFRIENDLY_ENABLE=getattr(settings, 'UNFRIENDLY_ENABLE', True )

#
# UNFRIENDLY_SECRET is used for encryption/decryption
# Note: AES keys must be either 16, 24, or 32 bytes long
Expand Down
5 changes: 4 additions & 1 deletion unfriendly/templatetags/unfriendly_tags.py
Expand Up @@ -34,4 +34,7 @@ def obfuscate(value, juice=None):
if juice:
kwargs['juice'] = slugify(juice)

return reverse('unfriendly-deobfuscate', kwargs=kwargs)
if settings.UNFRIENDLY_ENABLE:
return reverse('unfriendly-deobfuscate', kwargs=kwargs)
else:
return value

0 comments on commit 29c0e33

Please sign in to comment.