geonode.base.management.commands.helpers ======================================== .. py:module:: geonode.base.management.commands.helpers Functions --------- .. autoapisummary:: geonode.base.management.commands.helpers.confirm Module Contents --------------- .. py:function:: confirm(prompt=None, resp=False) Prompts the user for a yes or no response. Returns True for ``yes`` and False for ``no``. ``resp`` should be set to the default value expected by the caller when the user presses ENTER without providing an input. >>> confirm(prompt='Create Directory?', resp=True) Create Directory? [y]|n: True >>> confirm(prompt='Create Directory?', resp=False) Create Directory? [n]|y: False >>> confirm(prompt='Create Directory?', resp=False) Create Directory? [n]|y: y True