commands.reset_notifications_db

This module defines a Django management command to delete all existing notifications.

Classes

Command

A Django management command to delete all existing notifications.

Module Contents

class commands.reset_notifications_db.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: django.core.management.base.BaseCommand

A Django management command to delete all existing notifications.

If running inside a Docker container, the command deletes notifications without user confirmation. Otherwise, it prompts the user for confirmation.

help = 'Deletes all existing notifications'[source]
handle(**options)[source]

Entrypoint for the command.

Parameters:

**options (Any) – A variable-length argument.

Return type:

None

delete_notifications()[source]

Deletes all notifications and reports the result.

Return type:

None