Skip to main content

WordPress shortcode support for Django

Project description

This package provides WordPress shortcode support for Django templates. It is based on code by Mark Steadman.

Support for different shortcodes are generated by parsers. The package currently includes a parser for YouTube videos. Additional parsers can be submitted for inclusion at the package’s issue tracker.

Installation

Use pip install django-shortcodes or clone the Git repository.

Usage

{% load shortcodes_filters %}
{{ text|shortcodes|safe }}

Settings

Vimeo

  • SHORTCODES_VIMEO_HEIGHT: Default height for Vimeo videos.

  • SHORTCODES_VIMEO_WIDTH: Default width for Vimeo videos.

YouTube

  • SHORTCODES_YOUTUBE_JQUERY: Boolean whether the jquery.flash plugin is available.

  • SHORTCODES_YOUTUBE_HEIGHT: Default height for YouTube videos.

  • SHORTCODES_YOUTUBE_WIDTH: Default width for YouTube videos.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-shortcodes-0.4.0.tar.gz (4.2 kB view hashes)

Uploaded source

Built Distribution

django_shortcodes-0.4.0-py2-none-any.whl (6.4 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page