Installation & Setup

Requirements

  • Django 5.2+ (LTS)

  • Django REST Framework

  • djgentelella (core package)

Optional:

  • Celery, for queue-backed sending — pip install djgentelella[celery]. Without it the module falls back to SyncBackend and sends in-process.

  • Django Channels (if using WebSocket features) — pip install djgentelella[firmador]

Adding to INSTALLED_APPS

Add djgentelella.async_notification to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    'djgentelella',
    'rest_framework',
    'djgentelella.async_notification',
]

Running Migrations

python manage.py migrate

This creates the following database tables:

  • async_notification_emailtemplate

  • async_notification_emailnotification

  • async_notification_attachedfile

  • async_notification_newslettertemplate

  • async_notification_newsletter

  • async_notification_newslettertask

URL Configuration

Include the async_notification URLs in your project’s urls.py:

from django.urls import path, include

urlpatterns = [
    ...,
    path('async_notification/',
         include('djgentelella.async_notification.urls')),
]

The module registers the following URL patterns:

  • objapi/ - DRF router for all API ViewSets

  • email-notifications/ - Email notification management page

  • email-templates/ - Email template management page

  • newsletters/ - Newsletter management page

  • newsletter-templates/ - Newsletter template management page

  • newsletter-tasks/ - Newsletter task management page

  • autocomplete/ - Recipient autocomplete endpoint

  • model-fields/ - Model field introspection endpoint

  • upload-image/ - Image upload for TinyMCE editor

  • upload-video/ - Video upload for TinyMCE editor

  • preview-file/<int:pk>/ - Serve an attached file

  • reassociate-files/ - Reassociate uploaded files with a real object

  • preview-template/ - Template preview rendering

Permissions

All views require authentication (@login_required for HTML views, SessionAuthentication for API). The API ViewSets use AuthAllPermBaseObjectManagement with Django model permissions:

  • async_notification.view_emailnotification

  • async_notification.add_emailnotification

  • async_notification.change_emailnotification

  • async_notification.delete_emailnotification

And equivalents for emailtemplate, newslettertemplate, newsletter, and newslettertask.

Make sure to assign the appropriate permissions to users or groups that need access to the management UI.