Update Help msgs of management commands
PROD-399
This commit is contained in:
@@ -21,6 +21,7 @@ from __future__ import absolute_import, print_function
|
||||
import csv
|
||||
import logging
|
||||
import time
|
||||
from textwrap import dedent
|
||||
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.db import connections
|
||||
@@ -32,8 +33,23 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
Implementation of the bulk_user_org_email_optout command.
|
||||
One-off script to opt-out users for email from orgs.
|
||||
|
||||
Input: A CSV file with a user_id,org pair per line. For example:
|
||||
|
||||
1962921,FooX
|
||||
5506350,BarX
|
||||
5709986,FooX
|
||||
|
||||
Lines formatted with a double-quoted org also work fine, such as:
|
||||
|
||||
5506350,"BarX"
|
||||
|
||||
Opts-out every specified user/org combo row from email by setting the 'email-optin' tag to 'False'.
|
||||
If the user/org combo does not currently exist in the table, a row will be created for it which
|
||||
will be have the 'email-optin' tag set to 'False'.
|
||||
"""
|
||||
help = dedent(__doc__).strip()
|
||||
# Default number of user/org opt-outs to perform in each DB transaction.
|
||||
DEFAULT_CHUNK_SIZE = 1000
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ Optionally takes in username, email, and course UUID arguments.
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from datetime import datetime
|
||||
from textwrap import dedent
|
||||
from uuid import uuid4
|
||||
|
||||
from consent.models import DataSharingConsent
|
||||
@@ -34,8 +35,11 @@ from ...models import UserOrgTag
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
Implementation of the create_user_gdpr_testing command.
|
||||
Create a user with GDPR P1 PII for manual testing.
|
||||
Enrolls the user in the DemoX course.
|
||||
Optionally takes in username, email, and course UUID arguments.
|
||||
"""
|
||||
help = dedent(__doc__).strip()
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument(
|
||||
|
||||
@@ -9,6 +9,7 @@ import json
|
||||
import time
|
||||
import traceback
|
||||
from datetime import datetime, timedelta
|
||||
from textwrap import dedent
|
||||
|
||||
import six.moves.urllib.parse # pylint: disable=import-error
|
||||
from django.contrib.auth.models import User
|
||||
@@ -28,6 +29,7 @@ class Command(BaseCommand):
|
||||
Command to create contacts in hubspot for those partner who has enabled hubspot integration.
|
||||
This command is suppose to sync contact with hubspot on daily basis.
|
||||
"""
|
||||
help = dedent(__doc__).strip()
|
||||
|
||||
def _get_hubspot_enabled_sites(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user