They serve for different purposes. The include tag simply includes the entire content of the existing template and is unmodified. A custom inclusion tag passes context to a function, which may contain logic to control the context before passing it to the template.
For example, maybe I have a panel that will appear on multiple pages. A panel template requires several specific requests that must be passed to it through the context. Pages containing a panel do not require these context variables for anything else. If I include a panel template with an include tag, I will have to write these requests in all the views containing the panel and pass them as context variables.
Alternatively, I could write a special inclusion tag containing requests and pass them to the panel template. Using a special inclusion tag, I will not need to repeat the code to create its context in all views containing the panel. My views will contain less code and will be less cluttered context variables used only by the panel.
Although you're right in the sense that a custom inclusion tag that simply passes an unmanipulated context will be the same as an include tag.
dgel
source share