Skip to content

KeyError with custom_field_data on plugin #15447

Answered by candlerb
geckigek asked this question in Help Wanted!
Discussion options

You must be logged in to vote

Then I suspect it's because you've subclassed VideoIPathNMOSMultiDeviceConfiguration from VideoIPathDeviceConfiguration.

This isn't something you'd normally do in Django. For a start, which table will each type of object reside in? Either you will have multi-table inheritance, which is generally a bad thing, or you're trying to do some sort of single-table polymorphism which probably requires a plugin.

You can see that Netbox itself uses mixins, or abstract base classes: if you're looking to share code or attributes between two models, that would be the best way to go about it IMO.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@geckigek
Comment options

@candlerb
Comment options

@candlerb
Comment options

Answer selected by geckigek
@divad1196
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@satyam-pw
Comment options

@Sundsja
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants