Feature request: Extend Storage.save() to directly save strings/bytes

2021-02-17 Thread guettli
To save strings/bytes you need to use ContentFile up to now: path = default_storage.save('path/to/file', ContentFile(b'new content')) Docs: https://docs.djangoproject.com/en/3.1/topics/files/#storage-objects Things would be bit easier, if save() would support strings/bytes directly. This way

Re: Feature request: wigets attribute for ModelFormMixin class

2021-02-17 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I'll also chime in to say I'd be against expanding these shortcut parameters. They muddy the purpose of the View class for a small saving in LoC, and go against "TOOWTDI". On Wed, 17 Feb 2021 at 15:07, Tim Graham wrote: > This has been proposed before (closed as wontfix): > https://code.djangopr

Re: Feature request: wigets attribute for ModelFormMixin class

2021-02-17 Thread Tim Graham
This has been proposed before (closed as wontfix): https://code.djangoproject.com/ticket/24589 https://groups.google.com/g/django-developers/c/34HJqx48h6Y/m/Nm3UMTK4BgAJ On Wednesday, February 17, 2021 at 9:53:07 AM UTC-5 jonask...@gmail.com wrote: > > # Feature request: wigets attribute for Mod

Feature request: wigets attribute for ModelFormMixin class

2021-02-17 Thread Jonas Kiefer
# Feature request: wigets attribute for ModelFormMixin class ### Status quo The `ModelFormMixin` class currently implements the `fields` attribute by it self and pass it to the `modelform_factory`: ```python class ModelFormMixin(FormMixin, SingleObjectMixin): """Provide a way to show and h