@classmethod<EOL><INDENT>@contextmanager<EOL>def draft_context(cls):<DEDENT>
previous_state = g.get('<STR_LIT>')<EOL>try:<EOL><INDENT>g.draft = True<EOL>yield<EOL><DEDENT>finally:<EOL><INDENT>g.draft = previous_state<EOL><DEDENT>
Set the context to draft