djangosnippets.org: Latest snippets tagged with 'slice'https://djangosnippets.org/tags/slice/2012-12-05T01:50:35.772198-06:00Trim the center of a string
2012-12-05T01:50:35.772198-06:00grillermohttps://djangosnippets.org/snippets/2857/<p>I had to build unique strings for a payment system and i wanted to make them kindof friendly so i generated them with usernames and datetimes(safe enough uniqueness in combo), some usernames are long and they break the limit of this payment system so i thought i should cut the …</p>
Freely redistributableSlice filter
2007-03-06T14:52:47.258331-06:00sneeuhttps://djangosnippets.org/snippets/87/<p>Handy for things such as:
<code>{{ some_string|slice:","|join:";" }}</code></p>
Freely redistributable