#25866: Django migrations not picking up max_length change on FileField
-------------------------------------+-------------------------------------
Reporter: gabn88 | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.7
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by gabn88):
Ah, sorry! It works like I posted. But I wanted to do:
{{{
class S3PrivateFileField(models.FileField):
def __init__(self, *args, **kwargs):
if not kwargs.get('max_length',None):
kwargs.update({'max_length':1000})
super(S3PrivateFileField, self).__init__(*args, **kwargs)
self.storage.default_acl = "private"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25866#comment:3>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.b5b168f17e67d3383935f87225130ff4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.