Writing an plugin: AttributeError: module 'rest_framework.serializers' has no attribute '<Name of my serializer>' #15699
-
Netbox 3.7.4 I'm writing my first plugin, that will replace some custom scripts I've made to communicate with an external system. A bunch of coffee, and going through the tutorial when building my bare minimum plugin with one simple model, just to get to know how things connect together. So far:
However, if I try to add or edit an object in the UI, as soon as I press save, journalctl shows error:
I have gone through my code, and I'm scratching my head here, as I clearly have an serializer in place:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I have no idea about the exact problem but I'll try anyway:
Why would it search your custom serializer from there? |
Beta Was this translation helpful? Give feedback.
-
Further troubleshooting. Printing out the serializer_name in Doing an import in nbshell everything seems a little bit off. I find my serializer at: nb_itsm_info.api.ITSMInstanceSerialize Seems that my serializer ends up in an different path for some reason. The function
|
Beta Was this translation helpful? Give feedback.
-
To my horror, it seems that it is as simple as my devserver needed a reboot...... so used that things reload by itself, but in this case, it needed an hard reload.... It's working now... |
Beta Was this translation helpful? Give feedback.
To my horror, it seems that it is as simple as my devserver needed a reboot...... so used that things reload by itself, but in this case, it needed an hard reload.... It's working now...