views:

28

answers:

1

I'm using the flatpages app with markdown and on the (django) development server markdown works fine.

But when deployed on my staging server with apache/mod_python, all the markup vanish and I see the raw markdown formatting.

There's not much difference between my staging server and my dev server, both runs Ubuntu with the same packages installed (including python-markdown).

Also there is no errors at all, it just doesn't work. So I'm not sure were to start troubleshooting this issue ..

This is my template code:

{% extends "base.html" %}
{% load markup %}

{% block content %}
<h1>{{ flatpage.title }}</h1>
<div class="page">{{ flatpage.content|markdown }}</div>
{% endblock %}
A: 

I see at least one flag: "There's not much difference between my staging server and my dev server ...". Ahem.

I suggest going to your staging directory, make sure the copy of python you are using is exactly the same as the one Apache/mod_python is using, and then run the dev server there. You may get some interesting output.

In django/contrib/markup/templatetags/markup.py there is the following comment: "Markdown, which requires the Python-markdown library from http://www.freewisdom.org/projects/python-markdown". Does it, in fact, exist in the proper place?

We have a debugging page that dumps sys.modules so that we can see exactly what modules are coming from where.

Peter Rowell