Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Modeled link objects which include linking to objects, views and static urls.

Project description

Django Link
===========
**Modeled link objects which include linking to objects, views and static urls.**

.. image:: https://travis-ci.org/praekelt/django-link.svg?branch=develop
:target: https://travis-ci.org/praekelt/django-link

.. image:: https://coveralls.io/repos/github/praekelt/django-link/badge.svg?branch=develop
:target: https://coveralls.io/github/praekelt/django-link?branch=develop

.. contents:: Contents
:depth: 5

Installation
------------

#. Install or add ``django-link`` to your Python path.

#. Add ``link`` to your ``INSTALLED_APPS`` setting.

#. Add ``url(r'^link/', include("link.urls", namespace="link"))`` to your ``url patterns`` (only required if you intend on using the list/detail views)

Note: ``django-link`` relies on ``"django.contrib.contenttypes"`` framework so
this will need to be included in your ``INSTALLED_APPS`` setting.

Usage
-----

``django-link`` provides a model to add links to your projects. It provides a ``get_absolute_url``
method on the model which provides the url to either of these url types:

#. Standard url string.

#. Link to an ``object`` provided by the contenttype framework.

#. Link to a pre-existing view with configurable view params.

To use include the link object in the context of your view and include the following code:
``{{ link.get_absolute_url }}``

Or use the inclusion tag which has been provided:
``{% render_link slug %}``

To exclude certain apps from the view name choice field add the namespace in your settings:
``LINK = {"excluded-viewname-choices": ["admin"]}``

License
-------

Please see the License requirements in the LICENSE file of this repository.
Authors
=======

Praekelt Consulting
-------------------
* Jonathan Bydendyk
Changelog
=========

0.1.0
-----
#. Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-link, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size django_link-0.1.0-py2.7.egg (29.7 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size django_link-0.1.0-py2-none-any.whl (16.2 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size django-link-0.1.0.tar.gz (9.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page