Ticket #458 (assigned enhancement)

Opened 4 years ago

Last modified 3 years ago

Allow custom fields to define dependencies for model freezer

Reported by: koen.biermans@… Owned by: andrew
Priority: minor Milestone: 1.0
Component: migrations Version: 0.7
Keywords: freeze custom Cc:

Description

The field_dependencies method in the freezer (creator/freezer.py) hardcodes the determination of related models for FK, M2M etc fields.

If you have a custom field that needs a dependency, but is not a subclass of one of the django classes, the freezer misses that dependency and does not add the related model definition. It is obviously not difficult to add the related model definition manually into the migration, but it would be nice if a custom field could define a callback to return the dependent models.

Change History

comment:1 Changed 4 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 0.7.2

I agree - tentatively scheduling for 0.7.2.

comment:2 Changed 4 years ago by andrew

  • Milestone changed from 0.7.2 to 1.0
Note: See TracTickets for help on using tickets.