When extracting body of a document in HTML source format (i.e. without pandoc conversion before display), use BeautifilSoup, which is more tolerant, instead of xml.dom.minidom, which crashes too often.
{% extends "site/layout/base.html" %}
{% load i18n %}
{% block content %}
<h1>404: {% blocktrans %}Page not found{% endblocktrans %}</h1>
{% blocktrans %}The requested page could not be found.{% endblocktrans %}
{% endblock %}