TemplateSyntaxError

28 views
Skip to first unread message

Petar Pilipovic

unread,
Oct 8, 2014, 12:04:25 AM10/8/14
to django...@googlegroups.com
Hi all, I am currently under going a blog tutorial from http://matthewdaly.co.uk/blog/2014/01/02/django-blog-tutorial-the-next-generation-part-2/, and I am stuck whit makrdown, I am aware that Django not supporting it any more, but to keep things short I am geting this error.

TemplateSyntaxError: 'custom_markdown' is not a valid tag library: Template libr
ary custom_markdown not found, tried django.templatetags.custom_markdown,django.
contrib.admin.templatetags.custom_markdown,django.contrib.staticfiles.templateta
gs.custom_markdown

I have read some answer from stackoverflow, they propose that I put it in the setings.py in INSTALLED_APPS, which I did, bit I am stil getting the same error.
Can someone please explain to me what is going on?
I am a novice and I can say that Django is par excellence.
Tank you very much.

 

Erik Cederstrand

unread,
Oct 8, 2014, 7:05:03 AM10/8/14
to Django Users
Den 08/10/2014 kl. 06.04 skrev Petar Pilipovic <iam...@gmail.com>:

> Hi all, I am currently under going a blog tutorial from http://matthewdaly.co.uk/blog/2014/01/02/django-blog-tutorial-the-next-generation-part-2/, and I am stuck whit makrdown, I am aware that Django not supporting it any more, but to keep things short I am geting this error.
>
> TemplateSyntaxError: 'custom_markdown' is not a valid tag library: Template libr
> ary custom_markdown not found, tried django.templatetags.custom_markdown,django.
> contrib.admin.templatetags.custom_markdown,django.contrib.staticfiles.templateta
> gs.custom_markdown

Your problem is that django.contrib.marup was removed as of Django 1.6 (https://docs.djangoproject.com/en/1.5/internals/deprecation/#id2). You can install an external module, e.g. django_markup from https://github.com/bartTC/django-markup. Then add 'django_markup' to INSTALLED_APPS and use it in your templates like this:

{% load markup_tags %}
{{ my_markup_text|apply_markup:"markdown" }}


Erik
Reply all
Reply to author
Forward
0 new messages