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.3.0.tar.gz (490.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtailcloudinary-2.3.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wagtailcloudinary-2.3.0.tar.gz
Algorithm Hash digest
SHA256 d5959e3454cadf270f9baeb7739ab0098189dc3da388897b8000f594fb542d4b
MD5 6ac651395482d368accb532d36c22ab8
BLAKE2b-256 1900ecaa9d63a0d7b3b5ee6789d2b19e6f60eb1e2046163c772301ee42649073

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtailcloudinary-2.3.0.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.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtailcloudinary-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 845c6385e5bc121f215afb2115395d4c11896fa3fe3599df8c42a5afbeb479d4
MD5 c5a60f1ff6a3a4c5486c187219398e2c
BLAKE2b-256 ce2b2cde8370a6bd23cc754572acb51bcb1c68e5e341fd2ca14c73471f23fa05

See more details on using hashes here.

Provenance

The following attestation bundles were made for wagtailcloudinary-2.3.0-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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page