3👍
✅
It is sensible, this is how I do it.
I don’t see any drawbacks except maybe (since this is an existing project as I understand) if you run the new migration on a database which already has the indexes and views, this might crash your migration, so make sure to catch the exception.
👤Emma
0👍
Maybe you can use a post migrate signal to run your commands. I never used it but I used post syncdb signal in a previous project but it’s deprecated now. In my case there where no drawbacks.
👤t_io
- [Django]-Django custom User model authentication
- [Django]-How to add custom action button in Django admin form and post the information
Source:stackexchange.com