Using hashids in django template

2016-08-18 Thread Paul Aswa
Is there means of encoding an id using hashids in django templates? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: Using hashids in django template

2016-08-18 Thread Paul Aswa
Being a newbie to python and django, this seems to be giving me problems On Thursday, August 18, 2016 at 2:57:56 PM UTC+3, ludovic coues wrote: > > You might be looking for this > https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/ > > 2016-08-18 12:57 GMT+

Re: Using hashids in django template

2016-08-18 Thread Paul Aswa
gt; def hashid(value): > return hashids.encode(value) > > and your template like that: > > {{ id|hashid }} > > I omitted some part that are in the doc, like making the filter > available in your template. The doc have more information on the > subje