The issue:
I have some models structure in my Django app:
- Company
- Category (category has fk relation to companies)
- Payment (it doesn't matter in this context, just for the big picture, every payment has a category and a company)
Users can create companies. After that action, I want to load initial data for the most common categories of payments (there are about 30-40 categories, so it's not a good idea to hardcode it).
What I've tried to do:
I thought about Django's fixtures, but we can't modify them in runtime (to set fk relation to the exact company). So, how to load prepared fixtures with dynamic data and do it in runtime? Or maybe there is another way and another tool to implement this feature?