Replies: 1 comment
-
To fill custom data in the
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello team,
For a creation of new site, I want to import the data of another site (rack, devices ...) in this new site.
To do this, I created this first script (to add rack) :
from django.utils.text import slugify
from extras.scripts import *
from dcim.choices import DeviceStatusChoices, SiteStatusChoices, RackStatusChoices, LocationStatusChoices
from dcim.models import Device, DeviceRole, DeviceType, Manufacturer, Site, Rack, Location, Interface
from extras.scripts import *
class test(Script):
However I use customs fields to initialize the rack and I don't know how initialize this in rack's constructor ?
Do you know please how I can use customs fields in the constructor ?
Thanks
Regards
Beta Was this translation helpful? Give feedback.
All reactions