Compatibility for Django 4

Issue #129 resolved
Antonio H created an issue

Currently there is no support for Django 4. I had to monkey patching a function, so maybe it could be integrated in the library:

def _get_site_fixed():
    from django.apps import apps
    from django.contrib.sites.models import Site

    return (
        Site.objects.get_current()
        if apps.is_installed("django.contrib.sites")
        else None
    )

from postman import api

api._get_site = _get_site_fixed

Comments (4)

  1. Patrick Samson repo owner

    A fix for this problem is found.

    There is another issue with the postman_unread tag, found as well.

    A work is ongoing for another issue with getting messages by-conversation (i.e not by-message).

  2. Log in to comment