Opened 9 years ago
Closed 9 years ago
#25126 closed Bug (duplicate)
migrations adds settings variable to migration file
Reported by: | Daniel | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
# models.py
storage = FileSystemStorage(location=settings.PRIVATE_MEDIA_ROOT) class MyModel(models.Model): csvfile = models.FileField(upload_to='csv', storage=storage)
# 0001_initial.py
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')), ], ),
Note:
See TracTickets
for help on using tickets.
Duplicate of #24648