a Django app to provide WordPress-likeshortcode functionality.
Project description
Codetalker
==========
Codetalker is a simple Django app to include WordPress-like shortcode
functionality.
Detailed documentation is in the "docs" directory.
Quick start
-----------
1. Add "codetalker" to your INSTALLED\_APPS setting like this:
```python
INSTALLED_APPS = [
...
'codetalker',
]
```
2. Create a codetalker directory in your app to hold your parsers. Be
sure to create a blank `__init__.py`.
3. Parser functions should be defined like this:
```python
def codetalker_command(*args):
... parse your command here...
return html
```
Notice, no imports are required in your parser file.
4. Load `expand_codetalker` in your templates to have your 'shortcode' parsed:
```
{% load codetalker %}
...
{{ post.body|expand_shortcodes|safe }}
...
```
==========
Codetalker is a simple Django app to include WordPress-like shortcode
functionality.
Detailed documentation is in the "docs" directory.
Quick start
-----------
1. Add "codetalker" to your INSTALLED\_APPS setting like this:
```python
INSTALLED_APPS = [
...
'codetalker',
]
```
2. Create a codetalker directory in your app to hold your parsers. Be
sure to create a blank `__init__.py`.
3. Parser functions should be defined like this:
```python
def codetalker_command(*args):
... parse your command here...
return html
```
Notice, no imports are required in your parser file.
4. Load `expand_codetalker` in your templates to have your 'shortcode' parsed:
```
{% load codetalker %}
...
{{ post.body|expand_shortcodes|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
django-codetalker-0.1.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file django-codetalker-0.1.tar.gz
.
File metadata
- Download URL: django-codetalker-0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
8ac6059675c85cecea7e67ddac7c990ad5f3ad469d9e4bba1c6874fa61388059
|
|
MD5 |
2799ed20157d99b52e56a693924a06c4
|
|
BLAKE2b-256 |
fdd86d2a6541a8e7a7cd8f17db068f49141a821a3b21ba80b4aeb87eb98dbfa7
|
File details
Details for the file django_codetalker-0.1-py3-none-any.whl
.
File metadata
- Download URL: django_codetalker-0.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
dafb4549afb53bb87a01b62749175f8540394653dedb047bab64060693e61a19
|
|
MD5 |
620ef02d5b51d8bd8c1d1fc84e681af0
|
|
BLAKE2b-256 |
cc0a539400abcab6aaaf903f61b4acf07f9f195835e33d211c7b72ca134049e1
|