Skip to main content

django-generic-links

Simple app to attach links to any Django model. Compatible with Django 4+ and Python 3.9+

Features

  • Model Admin
  • Generic inline admin
  • A template tag to get all links for a given model instance

Installation

Installing django-generic-links is fairly easy. You can...

pip install django-generic-links

...or, you can clone the repo and install it the old fashioned way.

git clone git://github.com/matagus/django-generic-links.git
cd django-generic-links
sudo python setup.py install

then add generic_links to your settings.py:

INSTALLED_APPS = (
    # ...
    "generic_links",
)

and then run the migrations!

# python manage.py migrate

Usage

Imagine you have a music app in your project where you store Artist data. And you would like to store and display links for each artist, say his facebook page, his last.fm profile, his youtube artist page and the like:

Since a GenericLink instance will be associated to another object you usally wish to show an inline model admin form in that model form.

Now imagine you have an artist page. You're passing artist object using template context and you want to get all the links for it:

Development / Contributions

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Development commands

pip install -r requirements_dev.txt
invoke -l

Want to help?

If you'd like to help, write example code, contribute patches, document things on the wiki your help is always appreciated! Just fork the project, clone your repo, commit, push and send me a pull request

Documentation

The full documentation is at https://matagus.alameda.dev/django-generic-links/.

License

django-generic-links is released under an BSD License - see the LICENSE file for more information.

Credits

Tools used in building this package:

Metadata

Release files for django-generic-links 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-generic-links 0.8.1
File Size Uploaded
django-generic-links-0.8.1.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-generic-links 0.8.1
File Interpreter ABI Platform
django_generic_links-0.8.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 21.3 kB

Release history Release notifications | RSS feed

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

This release

0.8.1 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.4.0

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page