<s> from django import template <EOL> from django . core . urlresolvers import reverse <EOL> from random import random <EOL> from django_evercookie . config import settings <EOL> register = template . Library ( ) <EOL> """<STR_LIT>""" <EOL> @ register . simple_tag <EOL> def set_evercookie ( ec_obj , name , value = None ) : <EOL> if value is None : <EOL> context_dict = { "<STR_LIT>" : ec_obj , "<STR_LIT:name>" : name , "<STR_LIT:value>" : settings . cookie_value } <EOL> else : <EOL> context_dict = { "<STR_LIT>" : ec_obj , "<STR_LIT:name>" : name , "<STR_LIT:value>" : value } <EOL> return '''<STR_LIT>''' % context_dict <EOL> """<STR_LIT>""" <EOL> @ register . simple_tag <EOL> def reactivate_evercookie ( ec_obj , name ) : <EOL> context_dict = { "<STR_LIT>" : ec_obj , "<STR_LIT:name>" : name } <EOL> return '''<STR_LIT>''' % context_dict <EOL> """<STR_LIT>""" <EOL> @ register . simple_tag <EOL> def rediscover_evercookie ( ec_obj , name ) : <EOL> context_dict = { "<STR_LIT>" : ec_obj , "<STR_LIT:name>" : name } <EOL> return '''<STR_LIT>''' % context_dict </s>
