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`
## 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
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 278d88115eb2b4c41717068f611681b1bd8e2d69423fdbf93930cd1035bbc0d7 |
|
MD5 | f373925f4100fac1f71f9c197453113c |
|
BLAKE2b-256 | 722d30e4005589c540af738cdaea08d5f4454d7518b2099d21d6bb70476ad451 |
File details
Details for the file wagtailcloudinary-0.6.4-py3-none-any.whl
.
File metadata
- Download URL: wagtailcloudinary-0.6.4-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0f448a8b64725c74d4d18f7ed5473942c18e05097075647e88fc959a590ab0d |
|
MD5 | 324bc2fc60afb2760ea9587eb192c3a1 |
|
BLAKE2b-256 | ae8ca71a5fabce85383d7498d80ea5e61ddec8384c9d8617b705a38292b18b02 |