parameters: (sender, instance, created, **kwargs)
docstring: Django signal that fires when BookToc model is being saved.
  
      This will only set "mark_section_as" setting to "mainmatter" to
      newly created Sections
docstring_summary: Django signal that fires when BookToc model is being saved.
docstring_tokens: Django signal that fires when BookToc model is being saved .
function: def default_section_settings(sender, instance, created, **kwargs):
      """
      Django signal that fires when BookToc model is being saved.
  
      This will only set "mark_section_as" setting to "mainmatter" to
      newly created Sections
      """
  
      SECTION_TYPE = 0
  
      if created and instance.typeof == SECTION_TYPE:
          instance.settings = json.dumps({"mark_section_as": "mainmatter"})
          instance.save()
function_tokens: def default_section_settings ( sender , instance , created , * * kwargs ) : SECTION_TYPE = 0 if created and instance . typeof == SECTION_TYPE : instance . settings = json . dumps ( { "mark_section_as" : "mainmatter" } ) instance . save ( )