All Projects → idlesign → Django Sitecats

idlesign / Django Sitecats

Licence: bsd-3-clause
Django reusable application for content categorization.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Sitecats

Bootstrap Breadcrumbs
Django template tags for easy breadcrumbs using twitter bootstrap css classes or custom template
Stars: ✭ 91 (+405.56%)
Mutual labels:  django, navigation
Django Taggit Labels
Clickable label widget for django-taggit
Stars: ✭ 62 (+244.44%)
Mutual labels:  django, tags
Webstackpage.github.io
❤️静态响应式网址导航网站 - webstack.cc
Stars: ✭ 3,054 (+16866.67%)
Mutual labels:  navigation, tags
Django Sitetree
Reusable application for Django introducing site tree, menu and breadcrumbs navigation elements.
Stars: ✭ 330 (+1733.33%)
Mutual labels:  django, navigation
Django Analytical
Analytics services for Django projects
Stars: ✭ 891 (+4850%)
Mutual labels:  django
Menu
Menu and sidebar management package for Laravel
Stars: ✭ 6 (-66.67%)
Mutual labels:  navigation
Compass
🌍 Compass helps you setup a central navigation system for your application
Stars: ✭ 828 (+4500%)
Mutual labels:  navigation
Django Prometheus
Export Django monitoring metrics for Prometheus.io
Stars: ✭ 823 (+4472.22%)
Mutual labels:  django
Django2.0 Course
Django2.0视频教程相关代码(杨仕航)
Stars: ✭ 897 (+4883.33%)
Mutual labels:  django
Django Ninja
💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
Stars: ✭ 875 (+4761.11%)
Mutual labels:  django
Django Oidc Rp
A server side OpenID Connect Relying Party (RP, Client) implementation for Django.
Stars: ✭ 16 (-11.11%)
Mutual labels:  django
Django Rest Framework Gis
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.
Stars: ✭ 830 (+4511.11%)
Mutual labels:  django
Django Postgres Graphql Boilerplate
A Boilerplate for a Django-GraphQL Project
Stars: ✭ 17 (-5.56%)
Mutual labels:  django
Server
The Etebase server (so you can run your own)
Stars: ✭ 826 (+4488.89%)
Mutual labels:  django
Strawberry
A new GraphQL library for Python 🍓
Stars: ✭ 891 (+4850%)
Mutual labels:  django
Django Urlarchivefield
A custom Django model field that automatically archives a URL
Stars: ✭ 5 (-72.22%)
Mutual labels:  django
Ngc
NewGoCommand - An opinionated and lightweight project starter. (WORK IN PROGRESS)
Stars: ✭ 16 (-11.11%)
Mutual labels:  tags
Django rest example
Django/DRF rest application example.
Stars: ✭ 17 (-5.56%)
Mutual labels:  django
Seeker
Seeker - another job board aggregator.
Stars: ✭ 16 (-11.11%)
Mutual labels:  django
Fourth robot pkg
4号機(KIT-C4)用リポジトリ
Stars: ✭ 7 (-61.11%)
Mutual labels:  navigation

django-sitecats

https://github.com/idlesign/django-sitecats

.. image:: https://idlesign.github.io/lbc/py2-lbc.svg :target: https://idlesign.github.io/lbc/ :alt: LBC Python 2


.. image:: https://img.shields.io/pypi/v/django-sitecats.svg :target: https://pypi.python.org/pypi/django-sitecats

.. image:: https://img.shields.io/pypi/l/django-sitecats.svg :target: https://pypi.python.org/pypi/django-sitecats

.. image:: https://img.shields.io/coveralls/idlesign/django-sitecats/master.svg :target: https://coveralls.io/r/idlesign/django-sitecats

.. image:: https://img.shields.io/travis/idlesign/django-sitecats/master.svg :target: https://travis-ci.org/idlesign/django-sitecats

Description

Django reusable application for content categorization.

Nay, - you say, - all that tags business lacks structuring.

This application is just about structuring your data: build categories hierarchy and link your site entities to those categories.

.. code-block:: python

# Somewhere in views.py
from django.shortcuts import render, get_object_or_404

# Suppose Article model has sitecats.models.ModelWithCategory class mixed in.
from .models import Article


def article_details(self, request, article_id):
    """See, there is nothing special in this view, yet it'll render a page with categories for the article."""
    return self.render(request, 'article.html', {'article': get_object_or_404(Article, pk=article_id)})

def article_edit(self, request, article_id):
    """Let's allow this view to render and handle categories editor."""
    article = get_object_or_404(Article, pk=article_id)

    # Now we enable category editor for an article, and allow users
    # to add subcategories to `language`, and `os` categories
    # (suppose we created them beforehand with Admin contrib),
    # and link this article to them.
    article.enable_category_lists_editor(
        request,
        editor_init_kwargs={'allow_new': True},
        additional_parents_aliases=['language', 'os']
    )

    form = ... # Your usual Article edit handling code will be here.

    return render(request, 'article.html', {'article': article, 'form': form})

Template coding basically boils down to sitecats_categories template tags usage:

.. code-block:: html

<!-- The same html is just fine for demonstration purposes for both our views.
     Do not forget to load `sitecats` template tags library. -->
{% extends "base.html" %}
{% load sitecats %}

{% block contents %}
    <!-- Some additional functionality (e.g. categories cloud rendering,
         editor enhancements) will require JS. -->
    <script src="{{ STATIC_URL }}js/sitecats/sitecats.min.js"></script>

    <h1>{{ article.title }}</h1>
    <div id="article_categories">
        {% sitecats_categories from article %} <!-- And that's it. -->
    </div>
    <!-- Form code goes somewhere here. -->
{% endblock %}

Read the docs, sitecats can do more.

Documentation

http://django-sitecats.readthedocs.org/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].