Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview is showing correctly, but the django is rendering plain text instead of markdown formatted #61

Open
jeffwillette opened this issue Feb 2, 2016 · 3 comments

Comments

@jeffwillette
Copy link

jeffwillette commented Feb 2, 2016

I am using 1.9 and I cannot get the formatted mardown text to show in my template, but it works correctly in the preview. I have followed all the instructions. Is this a 1.9 bug?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30439782-preview-is-showing-correctly-but-the-django-is-rendering-plain-text-instead-of-markdown-formatted?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github).
@bradcrotty
Copy link

I think you need this at the top of your template page if you don't have it already:
{% load django_markdown %}
It worked for me (though using django 1.8)

@zhaochy1990
Copy link

I met the same problem today, and I load

{% load django_markdown %}

at the top of my template.

@marcjoos-phd
Copy link

I met the same problem, though {% load django_markdown %} did not solve the issue. I am working with Django 1.9 & django_markdown 2.6.8. Preview is working in the admin section (I had to modify the views.py to get it working), I just get plain text when the page is shown.

Here is my template:

{% extends 'blog/base.html' %}
{% load django_markdown %}

{% block content %}
<div>
    <h1><a href="{% url 'section_detail' pk=section.pk %}">{{ section.title }}</a></h1>
    <p>{{ section.text | safe | linebreaksbr }}</p>
</div>
{% endblock %}

Any clue appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants