Skip to main content

Cloudinary support for Wagtail CMS

Project description

Use cloudinary within wagtail

This project is still maintained, but I prefer this approach instead now https://gitlab.com/thelabnyc/wagtail-cloudinary-image

About

This package adds Cloudinary support to Wagtail CMS

cloudinary images in wagtail admin

Installation

pip install wagtailcloudinary

Wagtail 2.4 and Django 2.1 are supported.

Configuration

Add app wagtailcloudinary in your INSTALLED_APPS list. Also add cloudinary if not already done.

INSTALLED_APPS = [
    ...
    'cloudinary',
    'wagtailcloudinary',
    ...
]

in settings.py put your cloud_name, api_key and apy_secret into cloudinary configuration

import cloudinary

cloudinary.config(
    cloud_name=<YOUR_CLOUDINARY_CLOUD_NAME>,
    api_key=<YOUR_CLOUDINARY_API_KEY>,
    api_secret=<YOUR_CLOUDINARY_API_SECRET>,
)

Next edit your urls.py like this:

from wagtailcloudinary import site

urlpatterns = [
    ...
    url(r'^wagtailcloudinary', include(site.urls, namespace="wagtailcloudinary")),
    ...
]

Usage

in models.py

from wagtail.wagtailadmin.edit_handlers import FieldPanel
from wagtail.wagtailcore.models import Page
from wagtailcloudinary.fields import CloudinaryField
from wagtailcloudinary.widgets import AdminCloudinaryChooser

class SomePage(Page):
    image = CloudinaryField()

    content_panels = Page.content_panels + [
        FieldPanel('image', widget=AdminCloudinaryChooser),
    ]

Or use in a streamfield

from wagtailcloudinary.blocks import CloudinaryImageBlock

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtailcloudinary-2.2.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

wagtailcloudinary-2.2.2-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file wagtailcloudinary-2.2.2.tar.gz.

File metadata

  • Download URL: wagtailcloudinary-2.2.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for wagtailcloudinary-2.2.2.tar.gz
Algorithm Hash digest
SHA256 350abf80161058cf7887a4d460cd85f1d0b00456439990635dd4591b488598dc
MD5 e2fd7cf7678ac1adc82f49ba9c15625b
BLAKE2b-256 1f4bd49f07eb288f5e061e629571aa9b7c3b666f82c1c4144798f703d56e2e07

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtailcloudinary-2.2.2.tar.gz:

Publisher: .gitlab-ci.yml on thelabnyc/wagtailcloudinary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wagtailcloudinary-2.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtailcloudinary-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f29d74bc3d32fb81936158516ec0d5546697b5b56d6b0548c79c537eb718afd
MD5 f00b555f0c6b45c17007fc3db4f81b40
BLAKE2b-256 072350c4a57acb587c03c0f549af6500f24d7352d90ddb62c86557136ddbd0fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtailcloudinary-2.2.2-py3-none-any.whl:

Publisher: .gitlab-ci.yml on thelabnyc/wagtailcloudinary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page