lib.views

Django view machinery for rendering docutils content as HTML.

class django_docutils.lib.views.TitleMixin

Bases: ContextMixin

ContextMixin that capitalizes title and subtitle.

class django_docutils.lib.views.TemplateTitleView

Bases: TemplateView, TitleMixin

Combination of Template and Title mixin.

class django_docutils.lib.views.RSTMixin

Bases: object

Django Class-based view mixin for reStructuredText.

class django_docutils.lib.views.RSTRawView

Bases: TemplateTitleView

Send pure reStructuredText to template.

Requires template tags to process it.

{% load django_docutils %}
{% block content %}
  <div id="content_wrapper" class="content docutils-html fixed-toc-content">
    {% restructuredtext content show_title=False %}
  </div>
{% endblock content %}

{% block sidebar %}
  {% restructuredtext content toc_only=True %}
{% endblock sidebar %}
class django_docutils.lib.views.RSTView

Bases: RSTRawView, RSTMixin

RestructuredText Django View.