djangosnippets.org: Latest snippets tagged with 'reuse'https://djangosnippets.org/tags/reuse/2015-08-25T11:45:12.787479-05:00Reusable field forms using crispy-forms
2015-08-25T11:45:12.787479-05:00axelwasshttps://djangosnippets.org/snippets/10523/<p>If you need to use some source to construct your form (maybe some database info or some user input), or you use the same fields with the same functionality in various forms and need to write the same piece of code for each of them, then you are looking in …</p>
Freely redistributableRepeat blocks with new context / simple Jinja-like macro system
2007-07-26T19:14:21.350396-05:00miracle2khttps://djangosnippets.org/snippets/343/<p>A simple macro system that makes it possible to reuse previously defined
blocks, optionally with a custom context, similar to the macro
functionality in Jinja. <br />
</p>
<p>It requires some workarounds/hacks because we cannot reach
all the data from inside the django template system that we need, but it
seems to work …</p>
Freely redistributable