1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #8918 -- Made FileField.upload_to optional.

Thanks leahculver for the suggestion and dc and vajrasky for work
on the patch.
This commit is contained in:
Tim Graham
2013-10-11 08:07:25 -04:00
parent b67ab75e82
commit 945e033a69
7 changed files with 25 additions and 17 deletions

View File

@@ -120,8 +120,6 @@ def get_validation_errors(outfile, app=None):
if decimalp_ok and mdigits_ok:
if decimal_places > max_digits:
e.add(opts, invalid_values_msg % f.name)
if isinstance(f, models.FileField) and not f.upload_to:
e.add(opts, '"%s": FileFields require an "upload_to" attribute.' % f.name)
if isinstance(f, models.ImageField):
try:
from django.utils.image import Image