Adds a link plugin to django CMS
Project description
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.
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
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
Built Distribution
File details
Details for the file djangocms-link-2.1.1.tar.gz
.
File metadata
- Download URL: djangocms-link-2.1.1.tar.gz
- Upload date:
- Size: 29.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0666d7d81fe933d9ffde296ae4a62885bb3a04fee79d113261bd99e26d9a7bc7 |
|
MD5 | 6e30784145a067969dc325c9e58907a2 |
|
BLAKE2b-256 | 78c3c6cec1d30a7bffadb6c29cc024a18ed55fe3ed6e176c113352f7fdcb1051 |
Provenance
File details
Details for the file djangocms_link-2.1.1-py2-none-any.whl
.
File metadata
- Download URL: djangocms_link-2.1.1-py2-none-any.whl
- Upload date:
- Size: 191.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d34913e86ca8544fa36373d85f789a9c7321ac4536d5f58c1350144f7cc607b5 |
|
MD5 | 58f178e29241f784a9f17525afeb5314 |
|
BLAKE2b-256 | f69b19316cdd0dd01404a9e87c704db6df1ae77e077032a13cfec1526b30b091 |