Add intercom template tags.
parent
4006f570c6
commit
ab86bef67a
|
@ -0,0 +1,10 @@
|
||||||
|
from django import template
|
||||||
|
from settings_local import INTERCOM_SECRET_KEY
|
||||||
|
|
||||||
|
import hmac, hashlib
|
||||||
|
|
||||||
|
register = template.Library()
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def intercom_sha_256(user_id):
|
||||||
|
return hmac.new(INTERCOM_SECRET_KEY, user_id, digestmod=hashlib.sha256).hexdigest()
|
Loading…
Reference in New Issue