django-automatic-links is django app, that allows you to adding keywords that will be automatically converted into links.
Project description
django-automatic-links
django-automatic-links is a application, that allows you to adding keywords that will be automatically converted into links.
Requirements
Python 2.7+ or Python 3.2+
Django 1.8+
Installation
Use your favorite Python package manager to install the app from PyPI, e.g.
Example:
pip install django-automatic-links
Add automatic_links to INSTALLED_APPS:
Example:
INSTALLED_APPS = (
...
'automatic_links',
...
)
After run command manager.py migrate automatic_links.
Example usage
In templates
{% load automatic_link_tags %}
...
<p>{{ object.text|add_links|safe }}</p>
In code
from automatic_links.utils import render_links
text = render_links('text')
If you have many links and the process takes a long time, you need to concern yourself with cache.
Settings
LINK_DEFAULT_LIMIT (default: 0)
LINK_DEFAULT_EVERY (default: 1)
LINK_DEFAULT_TARGET (default: '_blank')
LINK_DEFAULT_NOFOLLOW (default: False)
LINK_DEFAULT_CSS_CLASS (default: None)
These values are only used in the model, you will still be able to customize for each link their values.
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
Built Distribution
Hashes for django-automatic-links-0.2.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e8a5fe8932b5813d963ee99f4042a702e27bc5131ef535dfe126b17c6656640 |
|
MD5 | c230a77083f8703dee813560713e53b8 |
|
BLAKE2b-256 | 91d9f66c04b7ca183de5380bacaa62f1631b7ef6d502ed680d3c60a6b8ddac70 |
Hashes for django_automatic_links-0.2.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b09c8c7d97f31f61a56a6283a24ffa420077733584682b4ac073fef2bd85221 |
|
MD5 | e2fb92743206895892cd7664d79e01b7 |
|
BLAKE2b-256 | df8b5133749cae7199254931dc160e49941593051f5f4d09aff296580650f6ea |