create_account
This module provides a Django management command to create a new Account record.
Classes
- Command
Implements logic for the
manage.py create_accountcommand.
Command-line Arguments
- –account_numberstr, optional
The account number for the new account.
- –company_namestr, optional
The company name for the new account.
Functionality
If
account_numberis provided, attempts to find or create an Account with that number and associates the company name.If only
company_nameis provided, finds or creates the Account based on company name.Populates account details like name (in snake_case) and description for newly created accounts.
Success or failure status is reported to the user.
Usage Example
python manage.py create_account –account_number=<number> –company_name=”<name>” python manage.py create_account –company_name=”<name>”