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, CloudinaryWidget

class SomePage(Page):
    image = CloudinaryField()

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

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

Uploaded Source

Built Distribution

wagtailcloudinary-1.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wagtailcloudinary-1.1.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for wagtailcloudinary-1.1.0.tar.gz
Algorithm Hash digest
SHA256 44856898492d885f31a112658dce8ab8e1660347278eb6e923badeb085bac62f
MD5 37076fad47d3800154ae65c4eeb25f21
BLAKE2b-256 1a7b22aabbdafa8899d8a9a6c3768e61dd6135816e31b3c19b08e1831dd7673f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wagtailcloudinary-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for wagtailcloudinary-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0536ec60305d08344dd5790765f0ddfceb0dbde5ab1754c7f883baf1ced3a25
MD5 132b2658fbd2125320ed9f67f83d068e
BLAKE2b-256 8d7e4f27f56a9bbefb6fceccb642580ddddbd0bf077b6d67fb6a5efcbebae70f

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