djangosnippets.org: Latest snippets tagged with 'FileFiled'https://djangosnippets.org/tags/filefiled/2011-01-15T15:09:03.563243-06:00Unique FileFiled or FileFiled with custom validation and overwriting files on update
2011-01-15T15:09:03.563243-06:00evilclayhttps://djangosnippets.org/snippets/2324/<p>I needed to overwrite files on update (not create new ones) but also a validation which would prevent to upload 2 files with the same name.</p>
<p>The CustomCheckFiled triggers a validation passing the filename and model instance. If the validation returns false, the validation error_message will be displayed in admin. …</p>
Freely redistributable