django-ptrack icon indicating copy to clipboard operation
django-ptrack copied to clipboard

Allow empty string settings.PTRACK_APP_URL

Open thenewguy opened this issue 6 years ago • 0 comments

I handle url normalization with a post processor. It would be handy if PTRACK_APP_URL could be an empty string.

Not a lot of work but I had to do this:

def rel_ptrack_tag(*args, **kwargs):
    encoded_dict = {'ptrack_encoded_data': ptrack_encoder.encrypt(*args, **kwargs)}
    url = reverse('ptrack', kwargs=encoded_dict)
    return mark_safe("<img src='%s' width=1 height=1>" % (url,))

thenewguy avatar Oct 14 '18 20:10 thenewguy