Skip to content

studygyaan/How-to-write-Django-Custom-Template-Tags-and-Filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to write Django Custom Template Tags and Filters

In this tutorial, you will learn how to write your own Django Custom Template Tags and Filters. There are lots of built-in template tags and filters in Django. But sometimes these tags are of no use or we need more functionality to do. For such a situation we create our own tags and filters.

Setup

  1. Create a folder and put all the files inside it.
  2. Create a virtual environtment - virtualenv env
  3. Activate VirtualENV - source env/bin/activate
  4. Run requirements.txt - pip3 install -r requirements.txt
  5. Run the Application - python3 manage.py runserver
  6. Go to - http://localhost:8000/