Django 1.9 has a libraries tag labels and dotted paths in Python template tag modules for registration in the template engine. This can be used to add new libraries or provide alternative labels for existing ones.
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], 'libraries': { # Adding this section should work around the issue. 'custom_tags' : 'myapp.templatetags.custom_tags',#to add new tags module, 'i18n' : 'myapp.templatetags.custom_i18n', #to replace exsiting tags modile }, }, }, ]
kartheek May 2 '16 at 7:13 2016-05-02 07:13
source share