delete_account_contact

This module provides a Django management command to remove an email address from.

the Account Contact list associated with a specific Account.

Classes

Command

Implements the logic for the manage.py delete_account_contact command.

Command-line Arguments

–account_numberstr, optional

The Smarter account number from which the contact should be removed.

–company_namestr, optional

The company name from which the contact should be removed.

–emailstr, optional

The email address of the contact to be removed.

–usernamestr, optional

The username for identifying the account contact. If supplied, the email is looked up from this username.

Functionality

  • Resolves the account from account number or company name.

  • Optional user’s username can be supplied to look up the email address.

  • Deletes the contact with the specified email from the resolved account.

  • Handles errors for missing accounts or contacts appropriately.

Usage Example

python manage.py delete_account_contact –account_number=<number> –email=<email> python manage.py delete_account_contact –company_name=”<name>” –username=<username>

class smarter.apps.account.management.commands.delete_account_contact.Command(*args, **kwargs)[source]

Bases: SmarterCommand

Remove an email address from the Account Contact list.

add_arguments(parser)[source]

Add arguments to the command.

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

Create the superuser account.