One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
import os | |
from django.core.exceptions import ValidationError | |
from django.core.files.images import get_image_dimensions | |
from django.utils.deconstruct import deconstructible | |
from wagtail.images.models import Image # To get the image object from wagtail collections | |
@deconstructible | |
class ImageValidator: | |
"""ImageField dimensions validator.""" |