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

Uploaded Source

Built Distribution

wagtailcloudinary-2.0.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wagtailcloudinary-2.0.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for wagtailcloudinary-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8db722a9f30dce2c5ca413bf2f9377da777343a20d3304edf8b7db951818b44a
MD5 aa0e9e0dceb3d719973eb9ec6fef99a1
BLAKE2b-256 01cab35b3f2d74f1063987db9be8f1d84fb193ad8983366915f4c56ff267230d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wagtailcloudinary-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6f98b57c575260b919f6b082a1030e4b4f0a0b80fd916ec4104689ce54f7159
MD5 f1dfe213d38341931bdf031f713a8d58
BLAKE2b-256 d288c70a3637fe5136b315c26939d473e9b8939e06946b52d9cd70aaee74c065

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