kagiso-image

Kagiso Image with Attribution


Install
pip install kagiso-image==3.0.3.post0

Documentation

kagiso_image

Codeship Status for Kagiso-Future-Media/kagiso_image

A custom Wagtail image that has optional fields for:

  • caption
  • attribution
  • alt_text

Installation

pip install kagiso_image

Add kagiso_image to your INSTALLED_APPS in your settings.py. Add WAGTAILIMAGES_IMAGE_MODEL = 'kagiso_image.ImageWithAttribution' to your settings.py.

python manage.py migrate

Usage

from kagiso_image.models import ImageWithAttribution


class MyPage(Page):
    my_image = models.ForeignKey(
        ImageWithAttribution,
        blank=True,
        null=True,
        on_delete=models.PROTECT,
        related_name='+'
    )

Settings

MIN_IMAGE_WIDTH = 100
MIN_IMAGE_HEIGHT = 100

# The above settings are only enforced if both are set!
# The values are None by default

Upload

python3 -m pip install --upgrade setuptools wheel twine python3 setup.py sdist bdist_wheel python3 -m twine upload dist/*