semvec/pypi-packages huggingface dataset:
django-sitecats 1.2.2
Django reusable application for content categorization.
License: BSD 3-Clause License

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

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


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
-------------

https://django-sitecats.readthedocs.org/
django-siteprefs 1.2.3
Reusable app for Django introducing site preferences system
License: BSD 3-Clause License

django-siteprefs
================
http://github.com/idlesign/django-siteprefs

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

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

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


What's that
-----------

*django-siteprefs allows Django applications settings to come alive*

Let's suppose you have your pretty settings.py file with you application:

.. code-block:: python

    from django.conf import settings

    MY_OPTION_1 = getattr(settings, 'MY_APP_MY_OPTION_1', True)
    MY_OPTION_2 = getattr(settings, 'MY_APP_MY_OPTION_2', 'Some value')
    MY_OPTION_42 = getattr(settings, 'MY_APP_MY_OPTION_42', 42)


Now you want these options to be exposed to Django Admin interface. Just add the following:

.. code-block:: python

    # To be sure our app is still functional without django-siteprefs.
    if 'siteprefs' in settings.INSTALLED_APPS:

        from siteprefs.toolbox import preferences

        with preferences() as prefs:
            # And that's how we expose our options to Admin.
            prefs(MY_OPTION_1, MY_OPTION_2, MY_OPTION_42)


After that you can view your settings in Django Admin.

If you want those settings to be editable through the Admin - ``siteprefs`` allows that too, and even more.

Read the docs ;)


Documentation
-------------

http://django-siteprefs.readthedocs.org/
django-siteblocks 1.2.1
Reusable application for Django introducing URL-dependent static and dynamic data blocks
License: BSD 3-Clause License

django-siteblocks
=================
http://github.com/idlesign/django-siteblocks

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

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

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

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


What's that
-----------

*django-siteblocks is a reusable application for Django to build blocks of static or dynamic data that could be used in templates.*

It allows you to describe data that doesn't clearly belong to any application in your project in terms of static or dynamic blocks,
that could be rendered in certain places on site pages. These blocks are addressed in templates by their aliases.

The following siteblock types are supported:

Static
~~~~~~
Those are defined using Django Admin contrib and are linked to certain URLs.

This allows different siteblock contents on different URLs. Just go to admin and add some blocks.

Dynamic
~~~~~~~

Those are ordinary Python functions registered as siteblocks returning contents.

This allows complex logic to build siteblock contents. Let's make a block with a random quote from Pratchett:

.. code-block:: python

        from random import choice

        from siteblocks.siteblocksapp import register_dynamic_block


        def get_quote(**kwargs):
            quotes = [
                'Early to rise, early to bed, makes a man healthy, wealthy and dead.',
                'The duke had a mind that ticked like a clock and, like a clock, it regularly went cuckoo.',
                'Speak softly and employ a huge man with a crowbar.',
            ]
            return choice(quotes)

        register_dynamic_block('quote', get_quote)


Block rendering
---------------

Use ``siteblocks`` tag to render block contents where you need it.

.. code-block:: html

    {% load siteblocks %}

    <div class="quote">
        {% siteblock "quote" %}
    </div>


Documentation
-------------

http://django-siteblocks.readthedocs.org/
django-yaturbo 1.0.1
Reusable Django app to enable Yandex Turbo Pages for your site
License: BSD 3-Clause License

django-yaturbo
==============
https://github.com/idlesign/django-yaturbo

|release| |lic| |coverage|

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

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

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


Description
-----------

*Reusable Django app to enable Yandex Turbo Pages for your site*

This app allows you to define Yandex Turbo pages feeds in term similar to those
of Django Syndication Feed Framework contrib:

1. Inherit your feed class from **YandexTurboFeed**:

.. code-block:: python

    # feeds.py
    from yaturbo import YandexTurboFeed

    class TurboFeed(YandexTurboFeed):
        """
        More information on Django Syndication Feed Framework configuration:
        https://docs.djangoproject.com/en/2.0/ref/contrib/syndication/
        """

2. Pass an instantiated (and optionally configured) feed object to `urlpatterns`:

.. code-block:: python

    # urls.py
    from .feeds import TurboFeed

    urlpatterns = [
        ...
        path('feeds/turbo/', TurboFeed()),
        ...
    ]


Read the docs for further information.


Documentation
-------------

http://django-yaturbo.readthedocs.org/
django-admirarchy 1.2.2
Django Admin addon to navigate through hierarchies
License: BSD 3-Clause License

django-admirarchy
=================
https://github.com/idlesign/django-admirarchy

|release| |lic| |coverage|

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

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

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


Description
-----------

*Django Admin addon to navigate through hierarchies.*

Have you ever wanted Django Admin to be able to navigate through hierarchies?

Without existing models modifications? Yeah!

Admirarchy does it in an old-school way, just like Norton Commander and Co - one level at a time.

Hierarchies described as adjacency lists and nested sets are supported.


.. code-block:: python

    # admin.py of your application
    from django.contrib import admin

    from admirarchy.toolbox import HierarchicalModelAdmin

    from .models import MyModel  # Let's say this model represents a hierarchy.


    # Inherit from HierarchicalModelAdmin instead of admin.ModelAdmin
    @admin.register(MyModel)
    class MyModelAdmin(HierarchicalModelAdmin):

        hierarchy = True  # This enables hierarchy handling.


Done. Go navigate %)


Documentation
-------------

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