Application for Django, that allows you to adding keywords that will be automatically converted into links.
Project description
django-automatic-links
===============
django-automatic-links is a reusable application for Django, that allows you to adding keywords that will be automatically converted into links.
Installation
===============
### Requires
django >= 1.4
Install with ``pip``:
Run ``pip install git+https://github.com/SilentSokolov/django-automatic-links.git``
Or ``pip install django-automatic-links``
Open ``settings.py`` and add ``automatic_links`` to your ``INSTALLED_APPS``:
INSTALLED_APPS = (
...
'automatic_links',
...
)
Run ``manager.py syncdb``
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.
Example usage
===============
## In templates
{% load automatic_link_tags %}
{{ object.text|add_links|safe }}
## 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.
===============
django-automatic-links is a reusable application for Django, that allows you to adding keywords that will be automatically converted into links.
Installation
===============
### Requires
django >= 1.4
Install with ``pip``:
Run ``pip install git+https://github.com/SilentSokolov/django-automatic-links.git``
Or ``pip install django-automatic-links``
Open ``settings.py`` and add ``automatic_links`` to your ``INSTALLED_APPS``:
INSTALLED_APPS = (
...
'automatic_links',
...
)
Run ``manager.py syncdb``
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.
Example usage
===============
## In templates
{% load automatic_link_tags %}
{{ object.text|add_links|safe }}
## 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.
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
Close
Hashes for django-automatic-links-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27f73e6c1903b51f5203b9bbd63dc0a93bf0fba3dfd0221f29502d21a4beec2c |
|
MD5 | f5bc5221547b71cdbeeafe7e9ea06e3c |
|
BLAKE2b-256 | 4552aba8699f178a21ec21d04ab999200d31bfe9983152bd26a68355717c8eb6 |