Invalid block tag on line 3: 'raw'. Did you forget to register or load this tag? with Django 1.9 and Jinja2 -
i beginner in django 1.9 , jinja2. have been trying implement jinja2 in django 1.9, keep receiving error below:
invalid block tag on line 2: 'raw'. did forget register or load tag?
the code giving problem is:
{%raw%}<form {{action "login" on="submit"}}>{%endraw%}
i have checked settings.py, not sure did wrongly:
templates = [ { 'backend': 'django.template.backends.django.djangotemplates', 'dirs': [ os.path.join(ember_dir, 'templates') ], 'options': { 'context_processors': [ # insert template_context_processors here or use # list if haven't customized them: 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', ], }, }, { 'backend': 'django.template.backends.jinja2.jinja2', 'app_dirs': true, 'dirs': [], },]
edit
i have solved issue downgrade django 1.8.8 , use django-jinja.
thanks guys :)
i guess format of block wrong. {% block raw %} {% endblock%} according documentation. more information here
Comments
Post a Comment