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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wagtailcloudinary-2.2.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for wagtailcloudinary-2.2.0.tar.gz
Algorithm Hash digest
SHA256 9a8cce1633f7d4509af4e042cf0290982a7f2b75eb781c25dba0575d837ffbff
MD5 fa2e2d0010578e21f02e9f21e911c4e8
BLAKE2b-256 37f788278cab1cac77c6ee795257cda8b8864e6c8dea8cd5e72ee9c0f5ef82ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wagtailcloudinary-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf91f626d9bbaad4a5a67372853cf196f258463bdfb0939c9e73636780a13e8c
MD5 19b2cf05122037cc329628343defe869
BLAKE2b-256 d775abd24dc62c0a0e2718aba94e7d31c793714342ac11938dd0f2c660bff1e7

See more details on using hashes here.

Supported by

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