Creating custom template tags and filters

Django offers a variety of built-in template tags, such as {% if %} or {% block %}. You have used several in your templates. You can find a complete reference of built-in template tags and filters at https://docs.djangoproject.com/en/2.0/ref/templates/builtins/.

However, Django also allows you to create your own template tags to perform custom actions. Custom template tags come in very handy when you need to add a functionality to your templates that is not covered by the core set of Django template tags.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset