Array of dictionaries in Django models and forms

44 Views Asked by At

I'm working on a static routes plugin for the Netbox project. For my static route object, I need a property, qualified_next_hops, which is a list of dictionary objects. Each item in the list field would have a few keys: next_hop_address, next_hop_interface, admin_distance, route_metric, route_tag.

In my model and forms, what field can I use for this list of dictionaries?

I've used ArrayField elsewhere, but I don't know how to use a dictionary object as the base field. Any advice?

0

There are 0 best solutions below