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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file django-template-shortcodes-0.0.3.tar.gz
.
File metadata
- Download URL: django-template-shortcodes-0.0.3.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
423ea88fced0e9ddd92adf0ab2e5b1ccebafa6352c0a0e5a2d840d3c04c53959
|
|
MD5 |
99307eb255f795425d2fd349826fe694
|
|
BLAKE2b-256 |
72d6e85665a7af8e2ce9cb8a255b767129df34ce43025bb275e6b6b99e5a53f7
|
File details
Details for the file django_template_shortcodes-0.0.3-py2.7.egg
.
File metadata
- Download URL: django_template_shortcodes-0.0.3-py2.7.egg
- Upload date:
- Size: 14.6 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cda0bc8b3f8e41517065f4a62ffe0226b1cd09b2ede138c9a4fea82f9d167076
|
|
MD5 |
62d005bad89fae3942576fb070f8abf3
|
|
BLAKE2b-256 |
c877aa50399493b3ae5ce0ff644e85f438371bb37250bea1e5e55bd249a498a5
|
File details
Details for the file django_template_shortcodes-0.0.3-py2-none-any.whl
.
File metadata
- Download URL: django_template_shortcodes-0.0.3-py2-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
096670cc2fc01d8b9ac0ed38d9ae30fb9f4d9c820943e2f08d80b116d8524c9b
|
|
MD5 |
476e11807ed242e12ccafd360084f982
|
|
BLAKE2b-256 |
4275fb7c5e5c31baa41a70e39a4cababd91f5f35ea148f7c3cd8a9df1cedf719
|