module documentation

Undocumented

Class CodeNode Undocumented
Function add_class https://stackoverflow.com/questions/4124220/django-adding-css-classes-when-rendering-form-fields-in-a-template
Function add_nested_class Undocumented
Function add_query_param Add a query parameter to the current request url, and return the new url.
Function as_list_of_strings Undocumented
Function as_string Undocumented
Function break_long_headers Breaks headers longer than 160 characters (~page length) when possible (are comma separated)
Function data Simple filter to access `data` attribute of object, specifically coreapi.Document.
Function form_for_link Undocumented
Function format_value Undocumented
Function get_pagination_html Undocumented
Function highlight_code Undocumented
Function items Simple filter to return the items of the dict. Useful when the dict may have a key 'items' which is resolved first in Django template dot-notation lookup. See issue #4931 Also see: https://stackoverflow...
Function optional_docs_login Include a login snippet if REST framework's login view is in the URLconf.
Function optional_login Include a login snippet if REST framework's login view is in the URLconf.
Function optional_logout Include a logout snippet if REST framework's logout view is in the URLconf.
Function render_field Undocumented
Function render_form Undocumented
Function render_markdown Undocumented
Function schema_links Recursively find every link in a schema, even nested.
Function smart_urlquote_wrapper Simple wrapper for smart_urlquote. ValueError("Invalid IPv6 URL") can be raised here, see issue #1386
Function with_location Undocumented
Constant TRAILING_PUNCTUATION Undocumented
Constant WRAPPING_PUNCTUATION Undocumented
Variable class_re Undocumented
Variable register Undocumented
Variable simple_email_re Undocumented
Variable simple_url_2_re Undocumented
Variable simple_url_re Undocumented
Variable word_split_re Undocumented
@register.filter
def add_class(value, css_class): (source)

https://stackoverflow.com/questions/4124220/django-adding-css-classes-when-rendering-form-fields-in-a-template Inserts classes into template variables that contain HTML tags, useful for modifying forms without needing to change the Form objects. Usage: {{ field.label_tag|add_class:"control-label" }} In the case of REST Framework, the filter is used to add Bootstrap-specific classes to the forms.

@register.filter
def add_nested_class(value): (source)

Undocumented

@register.simple_tag
def add_query_param(request, key, val): (source)

Add a query parameter to the current request url, and return the new url.

@register.filter
def as_list_of_strings(value): (source)

Undocumented

@register.filter
def as_string(value): (source)

Undocumented

@register.filter
def break_long_headers(header): (source)

Breaks headers longer than 160 characters (~page length) when possible (are comma separated)

@register.filter
def data(value): (source)

Simple filter to access `data` attribute of object, specifically coreapi.Document. As per `items` filter above, allows accessing `document.data` when Document contains Link keyed-at "data". See issue #5395

@register.simple_tag
def form_for_link(link): (source)

Undocumented

@register.filter
def format_value(value): (source)

Undocumented

@register.simple_tag
def get_pagination_html(pager): (source)

Undocumented

@register.tag(name='code')
def highlight_code(parser, token): (source)

Undocumented

@register.filter
def items(value): (source)

Simple filter to return the items of the dict. Useful when the dict may have a key 'items' which is resolved first in Django template dot-notation lookup. See issue #4931 Also see: https://stackoverflow.com/questions/15416662/django-template-loop-over-dictionary-items-with-items-as-key

@register.simple_tag
def optional_docs_login(request): (source)

Include a login snippet if REST framework's login view is in the URLconf.

@register.simple_tag
def optional_login(request): (source)

Include a login snippet if REST framework's login view is in the URLconf.

@register.simple_tag
def optional_logout(request, user): (source)

Include a logout snippet if REST framework's logout view is in the URLconf.

@register.simple_tag
def render_field(field, style): (source)

Undocumented

@register.simple_tag
def render_form(serializer, template_pack=None): (source)

Undocumented

@register.simple_tag
def render_markdown(markdown_text): (source)

Undocumented

@register.filter
def schema_links(section, sec_key=None): (source)

Recursively find every link in a schema, even nested.

def smart_urlquote_wrapper(matched_url): (source)

Simple wrapper for smart_urlquote. ValueError("Invalid IPv6 URL") can be raised here, see issue #1386

@register.filter()
def with_location(fields, location): (source)

Undocumented

TRAILING_PUNCTUATION: list[str] = (source)

Undocumented

Value
['.', ',', ':', ';', '.)', '"', '\']', '\'}', '\'']
WRAPPING_PUNCTUATION: list = (source)

Undocumented

Value
[('(', ')'), ('<', '>'), ('[', ']'), ('&lt;', '&gt;'), ('"', '"'), ('\'', '\'')]
class_re = (source)

Undocumented

register = (source)

Undocumented

simple_email_re = (source)

Undocumented

simple_url_2_re = (source)

Undocumented

simple_url_re = (source)

Undocumented

word_split_re = (source)

Undocumented