Replies: 1 comment
-
You need to do model imports inside the validate method because, as it tells you, apps are not loaded yet when the settings file is executed. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
How do you get a list of all dcim/locations in a custom validator? I created a custom field and want to make sure every time a new location is created it has a unique id associated to it. I tried:
from extras.validators import CustomValidator
from dcim.models import Location
I get an error about the apps are not fully loaded.
Beta Was this translation helpful? Give feedback.
All reactions