django CMS Link is a plugin for django CMS that allows you to add links on your site.
Python HTML
Latest commit bf17ee1 Jan 23, 2017 @haricot haricot committed with FinalAngel Added compatibility for django 1.10 (#117)
* Added compatibility for django 1.10

Fix issue #115 : AttributeError: 'Options' object has no attribute 'get_field_by_name
Idem PR #111

* Added compatibility for django 1.10
Permalink
Failed to load latest commit information.
.tx
djangocms_link Added compatibility for django 1.10 (#117) Jan 23, 2017
tests
.coveragerc further cleanup Sep 8, 2016
.editorconfig ensure newline is not added on the link plugin Oct 20, 2016
.gitignore
.travis.yml
CHANGELOG.rst Added compatibility for django 1.10 (#117) Jan 23, 2017
LICENSE.txt
MANIFEST.in
README.rst
addon.json Added aldryn config (#92) Aug 30, 2016
aldryn_config.py
preview.gif added final files Sep 10, 2016
setup.py final cleanup Sep 9, 2016
tox.ini adapted testing infrastructure, fixed migrations and docs Nov 18, 2016

README.rst

django CMS Link

pypi build coverage

django CMS Link is a plugin for django CMS that allows you to add links on your site.

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.

This addon is compatible with Divio Cloud and is also available on the django CMS Marketplace for easy installation.

preview.gif

Contributing

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.

Documentation

See REQUIREMENTS in the setup.py file for additional dependencies:

  • Python 2.7, 3.3 or higher
  • Django 1.8 or higher

Installation

For a manual install:

  • run pip install djangocms-link
  • add djangocms_link to your INSTALLED_APPS
  • run python manage.py migrate djangocms_link

Configuration

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 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}'

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.

Django Select2

This plugin supports django-select2 for simpler use of internal links. You need to manually enable it by:

  • run pip install django-select2
  • add django_select2 to your INSTALLED_APPS
  • add url(r'^select2/', include('django_select2.urls')), to your urls.py
  • set DJANGOCMS_LINK_USE_SELECT2 = True in your settings.py

Running Tests

You can run tests by executing:

virtualenv env
source env/bin/activate
pip install -r tests/requirements.txt
python setup.py test