Just for the record, I really spent quite a bit of time adapting a pre-existing snippet to make macros in django in a fairly reliable way, if you really want macros, please check it out .
As a tip, most of the time what you want to do with a macro you should really do with the include tag, as mentioned above; however, sometimes you just need a macro, and for this you need to use a template tag library such as my (which is one of the few that do this for django).
source share