Skip to content

Live API docs (#4755) makes markdown dependency non-optional #4941

Closed
@carltongibson

Description

@carltongibson

rest_framework.templatetags.rest_framework is non-conditionally importing markdown.

from markdown.extensions.fenced_code import FencedBlockPreprocessor

from rest_framework.compat import (
    NoReverseMatch, markdown, reverse, template_render
)

https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/templatetags/rest_framework.py#L12-L16

As per the compat import markdown has previously been an optional dependency. It's still listed as an optional requirement

Without markdown installed, the template tags can no longer be imported. cf carltongibson/django-filter#658

Markdown either needs to be declared required or a work around is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions