iommi_demo.app.management.commands.makestaff

Attributes

Classes

Command

Management command.

Functions

email_type(→ str)

Checks a string is an email addresses.

Module Contents

iommi_demo.app.management.commands.makestaff.RE_EMAIL
iommi_demo.app.management.commands.makestaff.email_type(value: str) str[source]

Checks a string is an email addresses.

Parameters:

value – The string to check.

Raises:

ArgumentTypeError – If it’s not a valid email address.

Returns:

The string, if it’s correct.

class iommi_demo.app.management.commands.makestaff.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

Management command.

help = 'Registers a given email as staff for the site.'
add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.