Skip to main content

Cloudinary support for Wagtail CMS

Project description

# Use cloudinary within wagtail

## About

This package adds Cloudinary support to Wagtail CMS

![cloudinary images in wagtail admin](./wagtailcloudinary.png)

## 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-0.6.4.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

wagtailcloudinary-0.6.4-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wagtailcloudinary-0.6.4.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.5

File hashes

Hashes for wagtailcloudinary-0.6.4.tar.gz
Algorithm Hash digest
SHA256 278d88115eb2b4c41717068f611681b1bd8e2d69423fdbf93930cd1035bbc0d7
MD5 f373925f4100fac1f71f9c197453113c
BLAKE2b-256 722d30e4005589c540af738cdaea08d5f4454d7518b2099d21d6bb70476ad451

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wagtailcloudinary-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d0f448a8b64725c74d4d18f7ed5473942c18e05097075647e88fc959a590ab0d
MD5 324bc2fc60afb2760ea9587eb192c3a1
BLAKE2b-256 ae8ca71a5fabce85383d7498d80ea5e61ddec8384c9d8617b705a38292b18b02

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