Skip to content

Instantly share code, notes, and snippets.

@nxaabl87
nxaabl87 / validators.py
Created December 14, 2016 14:56 — forked from mobula/validators.py
Performs file upload and image upload validation for django.
# -*- coding: utf-8 -*-
# https://gist.github.com/mobula/da99e4db843b9ceb3a3f
# @brief
# Performs file upload validation for django.
# with Django 1.7 migrations support (deconstructible)
# Provides:
# - FileValidator
# - ImageValidator (adds Image specific validation using PIL)