GithubHelp home page GithubHelp logo

imclab / django-simple-links Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kplaube/django-simple-links

0.0 1.0 0.0 86 KB

Simple bookmarking application for Django projects.

License: Other

django-simple-links's Introduction

Django Simple Links

https://secure.travis-ci.org/kplaube/django-simple-links.png https://coveralls.io/repos/kplaube/django-simple-links/badge.png https://badge.fury.io/py/django-simple-links.png https://pypip.in/d/django-simple-links/badge.png

Django Simple Links is a pluggable application that helps you to add a blogroll to projects wrote in Django.

Installation & Configuring

You can use pip to install the app:

pip install django-simple-links

After that, add 'simple_links' to INSTALLED_APPS in your project's settings.py. Finally, run the syncdb to add the tables to the database.

Usage

  • In the admin: 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 is the category's slug, links is the variable that will store your links and category is the variable that will store the category object. So you can handle it in "Django way", like this:

{% 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.

django-simple-links's People

Contributors

kplaube avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.