You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for this great package. This has become super complementary with django-tenants or django-pgschemas.
I happen to use different storages in local development and production. For local development I keep the default file system private storage, while for production I am using a customization of the S3 boto3 file storage.
Because of the way in which the storage is set here:
I am always getting a minor complain from Django in production that I have changes in my models that need migration. The change is basically shifting the file system storage, which is in my migrations, versus the S3 boto3 file storage which is then active.
This is actually a minor thing, nothing breaks here, it's only a polishing request. As a general rule, I think Django models should be done in a way that changing settings doesn't generate new migrations. I wonder if you would be okay to change the linked behavior and use a function instead, which could in turn return the exact same value that is being set here. I think that by using a function, Django won't detect any change in settings and won't think that there is a migration required.
I could open a PR for this if approved. Thanks!
The text was updated successfully, but these errors were encountered:
First of all, thanks for this great package. This has become super complementary with django-tenants or django-pgschemas.
I happen to use different storages in local development and production. For local development I keep the default file system private storage, while for production I am using a customization of the S3 boto3 file storage.
Because of the way in which the storage is set here:
django-private-storage/private_storage/fields.py
Line 50 in 5541ff6
I am always getting a minor complain from Django in production that I have changes in my models that need migration. The change is basically shifting the file system storage, which is in my migrations, versus the S3 boto3 file storage which is then active.
This is actually a minor thing, nothing breaks here, it's only a polishing request. As a general rule, I think Django models should be done in a way that changing settings doesn't generate new migrations. I wonder if you would be okay to change the linked behavior and use a function instead, which could in turn return the exact same value that is being set here. I think that by using a function, Django won't detect any change in settings and won't think that there is a migration required.
I could open a PR for this if approved. Thanks!
The text was updated successfully, but these errors were encountered: