#25126: migrations adds settings variable to migration file
----------------------------+--------------------
Reporter: dvinegla | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
# models.py
{{{#!python
storage = FileSystemStorage(location=settings.PRIVATE_MEDIA_ROOT)
class MyModel(models.Model):
csvfile = models.FileField(upload_to='csv', storage=storage)
}}}
# 0001_initial.py
{{{#!python
migrations.CreateModel(
name='MyModel',
fields=[
('csvfile',
models.FileField(storage=django.core.files.storage.FileSystemStorage(location=b'/path/to/development/computer/private/media/root'),
upload_to='csv')),
],
),
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25126>
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/051.96c05e25e77aaea8279e8ba91996b7b1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.