A pluggable application for adding a list of links (like a blogroll) to your Django project.
You can install the app through pip
:
pip install django-simple-links
After that, add simples_links
to INSTALLED_APPS
in your
settings.py
:
INSTALLED_APPS = (
...
'simple_links',
...
)
Finally, run migrate
to add tables to the database.
- Admin interface: Add a category called "blogroll" and a few links within this category.
- In your template: Load
link_list
and call{% get_link_list "blogroll" as links, category %}
.
blogroll
turns to be the category slug, links
and category
are variables that will keep those information
you've added through Admin interface:
{% load link_list %}
{% get_link_list "blogroll" as links, category %}
{% if links %}
<div class="module">
<h3 class="title">{{ category.title }}</h3>
<ul>
{% for link in links %}
<li>
<a href="{{ link.href }}"
title="{{ link.description }}">{{ link.title }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
That's all!
Contributions are very welcome.
- Drop support for Python 2.7
- Drop support for Django lesser than 2.2
- Fix migration to work with Django 2.0
- Stabilish support for Python 2.7, 3.6 and Django 1.8 (LTS), 1.11 (LTS) and 2.0
- Fix
setup.py
by adding themigrations
path to packages (thanks @gvangool)
- Updating documentation
- Maintaining compatibility with Django 1.4, 1.5, 1.6 and 1.7
- Suporting new versions of Django (1.8 and 1.9)
- Suporting Python 2.7 and Python 3.5