Getting all Manufacturer Data within a Custom Script #18654
-
Hi there, I would like to get all manufacturer-data in my custom script but I couldn't find any information how to do it without using the api. Is there something like: from dcim.models import Device
Device.objects.all() but for manufacturers? Sorry for such a low level question, but I searched for half a dozen hours and could find anything that works. I would be very happy if someone could give me some pointers. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
did you try using the nb-shell to explore the available models? if you start nb-shell you can do a You can do a |
Beta Was this translation helpful? Give feedback.
did you try using the nb-shell to explore the available models?
if you start nb-shell you can do a
lsmodels()
and see all available models. Manufacturer is one of them.You can do a
Manufacturer.objects.all()
to get all the manufacturers, when you import Manufacturer, just like you do with Device.