I have a question about storage objects in a migration enabled project.

I have a project that uses a file system storage backend for storing
certain model FileFields, but the location is dependent on the deployment
and stored in the settings module. For example, for testing locally I have
the storage root pointed at a directory under my home folder. Whenever I
run makemigration, it tries to alter all the FileFields to reflect whatever
the current setting is, even though this does not affect the database.

Is there a way to prevent the storage parameter from getting serialized in
the migration? If not, what is a good way to handle storing files in
different locations depending on a configuration, without a bunch of
unnecessary migrations?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK2-mOmtd9gPPGHy4SogMh-Md%3DkcrZ6HU7YWSaNYxEDVkeyQSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to