Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Django application to parse WordPress shortcodes.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 shortcodes
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
README.rst

django-shortcodes

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.
Something went wrong with that request. Please try again.