Hi Adam!

On Sunday, August 26, 2018 at 4:33:31 PM UTC+2, Adam Johnson wrote:
>
> My suggestion would be to add the new keyword argument which enable the 
>> new behavior and keep the attr-thing as is.
>> I could add a warning if someone uses the "old" style. It is a bit 
>> suggestive though.
>
>
> Whilst it's not the normal way of deprecating things in Django, I'm not 
> against it. Would we ever block attrs={'multiple':True} though? Afaiu there 
> would still be use cases for setting that attribute and doing custom 
> multiple file handling. Maybe even a warning wouldn't be necessary.
>
I am with you on that one. There is no need to prevent the other. Maybe it 
does boil down to a crisp sentence in the documentation that encourages 
users to use the new feature.

>
> On Sat, 25 Aug 2018 at 21:05, Johannes Hoppe <in...@johanneshoppe.com 
> <javascript:>> wrote:
>
>> Hi there!
>>
>> I do need some feedback on the best public API to implement multi file 
>> support to Django forms.
>>
>> Context:
>>
>> Up until now Django forms do not support multi file upload. You will need 
>> to write your own view to handle the files as described here:
>>
>> https://docs.djangoproject.com/en/2.1/topics/http/file-uploads/#uploading-multiple-files
>>
>> Of course it is not too hard to implement actual multi file support as I 
>> have been showcasing here:
>> https://github.com/django/django/pull/9011/files
>>
>> The question is now to best add support for multiple file uploads without 
>> wrecking backwards compatibility?
>>
>> As Tim wisely mentioned, it might be confusing to add a `multiple` 
>> argument to the FileField while also having the 
>> attrs={'multiple': True}
>> still in the mix.
>>
>> My suggestion would be to add the new keyword argument which enable the 
>> new behavior and keep the attr-thing as is.
>> I could add a warning if someone uses the "old" style. It is a bit 
>> suggestive though.
>>
>> What do you think, mabe look at the documentation changes in the PR for 
>> more context.
>>
>> Best
>> -Joe
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-develop...@googlegroups.com <javascript:>.
>> To post to this group, send email to django-d...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/e71675d3-be96-4189-b0c1-038774626284%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-developers/e71675d3-be96-4189-b0c1-038774626284%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Adam
>

Thanks joe 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/fd82736f-f2e0-41c5-ad3f-5ec8d8fb134e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to