Re: [Django] #27383: Regression: `FileField(default=None)` now never upload a file through a ModelForm

2016-10-25 Thread Django
#27383: Regression: `FileField(default=None)` now never upload a file through a
ModelForm
-+-
 Reporter:  Maxime Lorant|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  File |  Version:  1.10
  uploads/storage|   Resolution:
 Severity:  Normal   |  worksforme
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 I cannot reproduce a problem using this model and uploading through the
 default admin add/change view:
 {{{
 class FileModel(models.Model):
 file = models.FileField(default=None, null=True, blank=True)
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.a95a00e681c3b1088ffb27974e971520%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27383: Regression: `FileField(default=None)` now never upload a file through a ModelForm

2016-10-25 Thread Django
#27383: Regression: `FileField(default=None)` now never upload a file through a
ModelForm
-+-
 Reporter:  Maxime Lorant|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Maxime Lorant):

 I am using Django 1.10.2. I could give a project example when I have the
 time and if I can reproduce it from scratch :-) I am using S3 but I don't
 think the storage used is important here.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.cd2d7c54946bb88ac7e226d2c429ca2a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27383: Regression: `FileField(default=None)` now never upload a file through a ModelForm

2016-10-25 Thread Django
#27383: Regression: `FileField(default=None)` now never upload a file through a
ModelForm
-+-
 Reporter:  Maxime Lorant|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 Just to be sure, are you using Django 1.10.2? (see #27186 for a
 `FileInput` fix for fields with a `default`). As an aside, according to
 #10244, `FileField` can't be `null` anyway.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.b6ea273e7a83f22be6c99ed85bd10208%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27383: Regression: `FileField(default=None)` now never upload a file through a ModelForm

2016-10-25 Thread Django
#27383: Regression: `FileField(default=None)` now never upload a file through a
ModelForm
-+-
 Reporter:  Maxime Lorant|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Maxime Lorant):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> We had in our code the following line (don't ask why, I don't know):
>
> {{{
> class SomeModel(models.Model):
>  foo = ...
>  bar = ...
>  file = models.FileField(null=True, blank=True, default=None)
>

> class SomeModelForm(forms.ModelForm):
>  class Meta:
>   fields = ('foo', 'bar', 'file', )
> }}}
>
> It was working until Django 1.9.x, but switching to Django 1.10,
> submission of files through a ModelForm stopped working. I found a
> solution by removing the useless `default=None`. Even though its
> usefulness can be questioned, it looks like it is a regression not
> documented in the release notes.
>
> Should we bother adding it or fix it?

New description:

 We had in our code the following line (don't ask why, I don't know):

 {{{
 class SomeModel(models.Model):
  foo = ...
  bar = ...
  file = models.FileField(null=True, blank=True, default=None)


 class SomeModelForm(forms.ModelForm):
  class Meta:
   fields = ('foo', 'bar', 'file', )
 }}}

 It was working until Django 1.9.x, but switching to Django 1.10,
 submission of files through a ModelForm stopped working. I found a
 solution by removing the useless `default=None`. Even though its
 usefulness can be questioned, it looks like it is a regression not
 documented in the release notes.

 Should we bother adding it or change back the behaviour?

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ea0be4a6e38b8e0bb45eb22d2adc6342%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27383: Regression: `FileField(default=None)` now never upload a file through a ModelForm

2016-10-25 Thread Django
#27383: Regression: `FileField(default=None)` now never upload a file through a
ModelForm
--+
 Reporter:  Maxime Lorant |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  File uploads/storage  |Version:  1.10
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 We had in our code the following line (don't ask why, I don't know):

 {{{
 class SomeModel(models.Model):
  foo = ...
  bar = ...
  file = models.FileField(null=True, blank=True, default=None)


 class SomeModelForm(forms.ModelForm):
  class Meta:
   fields = ('foo', 'bar', 'file', )
 }}}

 It was working until Django 1.9.x, but switching to Django 1.10,
 submission of files through a ModelForm stopped working. I found a
 solution by removing the useless `default=None`. Even though its
 usefulness can be questioned, it looks like it is a regression not
 documented in the release notes.

 Should we bother adding it or fix it?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.860eb393457945500beb5e0d957bb2ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.