Skip to content

Commit

Permalink
Add note about how to expand use cases for this command
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Jan 23, 2023
1 parent c3a4d54 commit fc90d36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion readthedocs/core/management/commands/contact_owners.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import structlog
import sys
from pathlib import Path
from pprint import pprint

import structlog
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
Expand Down Expand Up @@ -48,6 +48,13 @@ class Command(BaseCommand):
By default the command won't send the email/notification (dry-run mode),
add the ``--production`` flag to actually send the email/notification.
.. note::
If you need to extend the behavior or add a new use case,
we recommend creating a simple script file that re-use the methods and functions from this command.
This is an example to contact Domain owners:
https://gist.github.com/humitos/3e08ed4763a9312f5c0a9a997ea95a42
"""

help = 'Send an email or sticky notification from a file (markdown) to all owners.'
Expand Down

0 comments on commit fc90d36

Please sign in to comment.