Skip to main content

A Django app to handle basic notifications.

Project description

Django Dans Notifications

Lint Test Types codecov

Python Versions Django Versions PyPI Version Downloads License Codacy grade Code style

Description

A Django app to handle notifications.

Support for basic notifications, push notifications, and email notifications.

Available on PyPi

Quick Start

pip install django-dans-notifications

See the Getting Started Guide for detailed installation and configuration instructions.

Requirements

  • Python 3.8 or higher
  • Django 3.1 or higher
  • Django Rest Framework (with authentication configured)

Basic Usage

from django_dans_notifications.models.notifications import NotificationEmail

# Send an email notification
notification = NotificationEmail.objects.send_email(
    subject="Welcome",
    template="django-dans-emails/default.html",
    sender="noreply@example.com",
    recipients=["user@example.com"],
    context={"team_name": "My Team"}
)

See the Usage Guide for more examples and advanced usage.

Features

Models

  • NotificationEmail: Handles email notifications.
  • NotificationBasic: Handles basic notifications.
  • NotificationPush: Handles push notifications.

Managers

  • NotificationEmailManager: Handles sending and managing email notifications.
  • NotificationBasicManager: Handles basic notifications.
  • NotificationPushManager: Handles push notifications.

API ViewSets

  • NotificationEmailViewSet: API endpoints for email notifications.
  • NotificationBasicViewSet: API endpoints for basic notifications.
  • NotificationPushViewSet: API endpoints for push notifications.

Utility Classes

  • NotificationManager: Exposes common functionality and maintains object permissions.
    • Methods: get_notifications_push/email/basic/all, mark_notification_basic_read.

Documentation

Support

For issues, questions, or contributions, please visit the GitHub repository.


https://danielnazarian.com
Copyright 2024 © Daniel Nazarian.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_dans_notifications-1.3.1.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_dans_notifications-1.3.1-py3-none-any.whl (49.1 kB view details)

Uploaded Python 3

File details

Details for the file django_dans_notifications-1.3.1.tar.gz.

File metadata

File hashes

Hashes for django_dans_notifications-1.3.1.tar.gz
Algorithm Hash digest
SHA256 d4ad6ce2e62c14e9e61c5e9c7b53c9d92234fa23f4dbbe658cdab11675816a7a
MD5 dd54179b6e39952e54a5602ff44b2746
BLAKE2b-256 055b9f775836d78d64fd70d7047ff9bf9b4280640461c8123aafe235a40902f6

See more details on using hashes here.

File details

Details for the file django_dans_notifications-1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_dans_notifications-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f7947d4865a07de77fb2d395b84a016fed47299bc228c3ff061f6198e866e76
MD5 61dd8ea6a48381edcdd1e7f63635247c
BLAKE2b-256 01c9d0059ea06bf27fd59b00bf56357bf001774eb9b59dbfac03b966d95f5a2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page