django CMS Link is a plugin for django CMS that allows you to add links on your site.
This addon is compatible with Aldryn and is also available on the django CMS Marketplace for easy installation.
This is a an open-source project. We'll be delighted to receive your feedback in the form of issues and pull requests. Before submitting your pull request, please review our contribution guidelines.
One of the easiest contributions you can make is helping to translate this addon on Transifex.
See REQUIREMENTS
in the setup.py
file for additional dependencies:
- Python 2.7, 3.3 or higher
- Django 1.8 or higher
For a manual install:
- run
pip install djangocms-link
- add
djangocms_link
to yourINSTALLED_APPS
- run
python manage.py migrate djangocms_link
Note that the provided templates are very minimal by design. You are encouraged to adapt and override them to your project's requirements.
This addon provides a default
template for all instances. You can provide
additional template choices by adding a DJANGOCMS_LINK_TEMPLATES
setting:
DJANGOCMS_LINK_TEMPLATES = [ ('feature', _('Featured Version')), ]
You'll need to create the feature folder inside templates/djangocms_link/
otherwise you will get a template does not exist error. You can do this by
copying the default
folder inside that directory and renaming it to
feature
.
To get django-select2
support https://github.com/applegrew/django-select2#installation
If you want to enable the ajax loading:
- In your projects
virtualenv
, runpip install Django-Select2
. - Add
'django_select2'
to yourINSTALLED_APPS
settings. - Add
url(r'^select2/', include('django_select2.urls')),
to your mainurls.py
.
You can run tests by executing:
virtualenv env source env/bin/activate pip install -r tests/requirements.txt python setup.py test
To support environments where non-standard URLs would otherwise work, this project supports the defining of an additional RegEx pattern for validating the host-portion of the URL.
For example:
# RFC1123 Pattern: DJANGOCMS_LINK_INTRANET_HOSTNAME_PATTERN = r'[a-z,0-9,-]{1,15}' # NetBios Pattern: DJANGOCMS_LINK_INTRANET_HOSTNAME_PATTERN = r'[a-z,0-9,!@#$%^()\\-\'{}.~]{1,15}'
Either of these might accept a URL such as:
http://SEARCHHOST/?q=some+search+string
If left undefined, the normal Django URLValidator will be used.
This plugin supports child plugins. If you add an other plugin as a child it will take this content instead of the link name as the content of the link.
If you want to help translate the plugin please do it on transifex:
https://www.transifex.com/projects/p/djangocms-link/resource/djangocms-link/