Skip to content

calling custom field in a custom script. #13588

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

You must be logged in to vote

custom_field_data is a single JSON object containing all custom fields. So there's no need to filter on it:

zones = Zone.objects.filter(view=view, status__in=Zone.ACTIVE_STATUS_LIST)
for zone in zones:
    print (zone, zone.custom_field_data)

(assuming that this plugin model has been defined to permit custom fields)

In this case, the content of custom_field_data would look like {"testing":"A"}

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@john2893
Comment options

Answer selected by john2893
Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

Comment options

You must be logged in to vote
1 reply
@candlerb
Comment options

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