About Checking the Validity of Function Arguments
Use assertion statements to validate function arguments and the code flow:
@db_task()
def notify_feedback_sender(user_id=None, email=None):
assert user_id or email, "User or visitor email must be passed"
...
Tips and Tricks Programming Django 5.x Django 4.2 Django 3.2 Python 3 Huey Celery
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.