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.
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.
Changelog
2.0.0
Add missing migrations.
String representation for Python 3.
Django 2 compatibility.
0.1.1
Django 1.11 support.
0.1.0
Initial release.
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 django-link-2.0.0.tar.gz
.
File metadata
- Download URL: django-link-2.0.0.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6b0b5e3f142bb3e82646efe7c7ea2a2b61cd322239aaea78ca6ab67e207e912 |
|
MD5 | a54254f5fc51cacaf585e8044b40cbda |
|
BLAKE2b-256 | 0bf9bd49f28f217358eb4446b76a7c2235142188d85fe2584414d2f378af3cba |
File details
Details for the file django_link-2.0.0-py2.7.egg
.
File metadata
- Download URL: django_link-2.0.0-py2.7.egg
- Upload date:
- Size: 49.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b159a85d07e4fff12683bc64a00e31ce468778057266f7c5dee9b9eb102ff1c |
|
MD5 | 5568076dded6be021e25aee1ccca31a3 |
|
BLAKE2b-256 | c957ad1915cac528879c68354c08673322ca132598211439210b89e7a9256c77 |