Git Product home page Git Product logo

djangocms-link's Introduction

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.

We're grateful to all contributors who have helped create and maintain this package. Contributors are listed at the contributors section.

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 django djangocms

  • Django Filer 1.7 or higher

Make sure django Filer is installed and configured appropriately.

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

djangocms-link's People

Contributors

adrien-delhorme avatar bashu avatar bplociennik avatar brente avatar captainchaos avatar chive avatar chronossc avatar czpython avatar digi604 avatar donce avatar evildmp avatar finalangel avatar fp4code avatar fygul avatar gkmngrgn avatar grigno avatar haricot avatar jedie avatar jsma avatar mkoistinen avatar morganwahl avatar narenderrajub avatar ojii avatar otg-sandrey avatar rda-dev avatar stefanfoulis avatar vthaian avatar vxsx avatar vytisb avatar yakky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.