Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

References/Resource Category: Difference between revisions

From OHC Network Wiki
More languages
Content deleted Content added
Document delete capability (ENG-441) (via update-page on MediaWiki MCP Server)
Fix unclosed wikilink so has_children row stores in ModelField table (via update-page on MediaWiki MCP Server)
Line 56: Line 56:
{{Field|model=ResourceCategory|section=Tree structure|name=parent|type=FK → emr.ResourceCategory (CASCADE)|notes=Self-reference to the parent node; nullable. <code>related_name=&quot;children&quot;</code>. <code>__exclude__</code>d from spec serialization — written via slug lookup, read via <code>get_parent_json()</code>}}
{{Field|model=ResourceCategory|section=Tree structure|name=parent|type=FK → emr.ResourceCategory (CASCADE)|notes=Self-reference to the parent node; nullable. <code>related_name=&quot;children&quot;</code>. <code>__exclude__</code>d from spec serialization — written via slug lookup, read via <code>get_parent_json()</code>}}
{{Field|model=ResourceCategory|section=Tree structure|name=is_child|type=BooleanField|notes=Default <code>False</code>. Exposed on write (<code>ResourceCategoryWriteSpec</code>) and read}}
{{Field|model=ResourceCategory|section=Tree structure|name=is_child|type=BooleanField|notes=Default <code>False</code>. Exposed on write (<code>ResourceCategoryWriteSpec</code>) and read}}
{{Field|model=ResourceCategory|section=Tree structure|name=has_children|type=BooleanField|notes=Default <code>False</code>. Flips to <code>True</code> on the parent when a child is created (see [[#methods--save-behaviour}}
{{Field|model=ResourceCategory|section=Tree structure|name=has_children|type=BooleanField|notes=Default <code>False</code>. Flips to <code>True</code> on the parent when a child is created (see [[#methods--save-behaviour|Methods &amp; save behaviour]]}}
{{Field|model=ResourceCategory|section=Tree structure|name=root_org|type=FK → emr.ResourceCategory (CASCADE)|notes=Self-reference to the root of this node's tree; nullable. <code>related_name=&quot;root&quot;</code>. Not exposed in specs}}
{{Field|model=ResourceCategory|section=Tree structure|name=root_org|type=FK → emr.ResourceCategory (CASCADE)|notes=Self-reference to the root of this node's tree; nullable. <code>related_name=&quot;root&quot;</code>. Not exposed in specs}}
|}
|}