semvec/pypi-packages huggingface dataset:
wagtail-modelchooser-1.13.1 1.0.0
Model choosers for Wagtail admin
License: BSD License

=====================
Wagtail model chooser
=====================

A plugin for Wagtail that provides a ``ModelChooserPanel`` and ``ModelChooserBlock``
for arbitrary models.

Installing
==========

Install using pip::

    pip install wagtail-modelchooser

Then add it to your ``INSTALLED_APPS``:

.. code-block:: python

    INSTALLED_APPS = [
        # ...
        'wagtailmodelchooser',
        # ...
    ]

It works with Wagtail 1.4 and upwards.

Quick start
===========

To enable the chooser for your model, you must register the model.
For simple cases, decorate your model with ``@register_model_chooser``:

.. code:: python

    from django.db import models

    from wagtailmodelchooser import register_model_chooser


    @register_model_chooser
    class Author(models.Model):
        name = models.CharField(max_length=255)

        def __str__(self):
            # The ``str()`` of your model will be used in the chooser
            return self.name

You can then use either ``ModelChooserPanel`` in an edit handler definition,
or ``ModelChooserBlock`` in a ``StreamField`` definition:

.. code:: python

    from wagtail.wagtailcore.blocks import RichTextBlock
    from wagtail.wagtailcore.fields import StreamField
    from wagtail.wagtailcore.models import Page
    from wagtail.wagtailadmin.edit_handlers import FieldPanel, StreamFieldPanel
    from wagtailmodelchooser.blocks import ModelChooserBlock
    from wagtailmodelchooser.edit_handlers import ModelChooserPanel

    class Book(Page):
        name = models.CharField(max_length=255)
        author = models.ForeignKey(Author)

        content_panels = [
            FieldPanel('name'),
            ModelChooserPanel('author'),
        ]

    class ContentPage(Page):
        body = StreamField([
            ('text', RichTextBlock()),
            ('author', ModelChooserBlock('books.Author')),
        ])

        content_panels = [
            StreamFieldPanel('body'),
        ]
sciservices 0.1.1
DBMI Authentication/Authorization
License: BSD License

=====
Sci Services
=====

Sci Services is a package containing utilities for utilizing DBMI Tech-Core's
authentication and authorization service infrastructure

Detailed documentation is in the "docs" directory.

Quick start
-----------

1. Add "sciservices" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'sciservices',
    ]

2. To ensure a valid user is signed in, decorate your views like so:

    from sciservices.auth import sciuser_required

    @sciuser_required
    def my_view(request):
        ...