django-generic-links
Simple app to attach links to any Django model. Compatible with Django 1.1x, 2.x and 3.x :)
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
Using django-generic-links models
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:
Generic Links Inline Admin
Since a GenericLink instance will be associated to another object you usally wish to show an inline model admin form in that model form.
Using django-generic-links templatetags
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:
- Cookiecutter and cookiecutter-djangopackage for rendering this package.
- Carbon for those beautiful code snippets.
Metadata
Release files for django-generic-links 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-generic-links-0.7.1.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_generic_links-0.7.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 21.6 kB
Release files / django-generic-links-0.7.1.tar.gz
| Download URL | django-generic-links-0.7.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89014efb948bb7c50e1a614d022a4e1a917200ac0c4016bef7402c2ff049bb46
|
|
BLAKE2b-256 checksum How to use checksums |
7ccfabc6707156d72ce2b04e8ce6ab2f617f7330fe6b17c81a9dc8b82cc75fc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Release files / django_generic_links-0.7.1-py2.py3-none-any.whl
| Download URL | django_generic_links-0.7.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dabfde48120fd1ace0a43c8ae71b8e9b265047fbbbbc508ab6f4e703c90c21a3
|
|
BLAKE2b-256 checksum How to use checksums |
c91ef135d85cead9513a1336b07774c90feb944289adf96c8fbbadaeb4ce9eea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|