Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Limited WordPress shortcode support for Django

Project description

# django-template-shortcodes

THIS IS EXPERIMENTAL STUFF. Don’t use it. Probably.

This package provides some [WordPress shortcode](http://en.support.wordpress.com/shortcodes/) support for Django templates. It is heavily based on [AGoodId’s version of django-shortcodes](https://github.com/AGoodId/django-shortcodes) (in turn based on https://code.google.com/p/django-shortcodes/), as well as [WP Export Parser](https://github.com/RealGeeks/wp_export_parser) for the regex parts, lifted from WordPress.

## Supported shortcodes (sort of):

  • [caption caption=”Foo bar”]<img src=”” alt=”” />[/caption]
  • [caption]<img src=”” alt=”” /> Foo bar[/caption]
  • [youtube=https://www.youtube.com/watch?v=dQw4w9WgXcQ]
  • [youtube url=”https://www.youtube.com/watch?v=dQw4w9WgXcQ”]
  • [gmaps url=”https://www.youtube.com/watch?v=dQw4w9WgXcQ”]
  • [vimeo url=”https://www.vimeo.com/watch?v=dQw4w9WgXcQ”]
  • [iframe url=”https://www.vimeo.com/watch?v=dQw4w9WgXcQ”]

## Installation

Install via pip: pip install django-template-shortcodes Or clone the [Git repository](https://github.com/emilbjorklund/django-shortcodes).

## Usage

Parse shortcodes:

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

Remove shortcodes (completely, including contents inside):

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

Project details


Download files

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

Files for django-template-shortcodes, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size django_template_shortcodes-0.0.3-py2.7.egg (14.6 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size django_template_shortcodes-0.0.3-py2-none-any.whl (9.3 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size django-template-shortcodes-0.0.3.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View

Supported by

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