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 (8)

  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. Patrick Samson repo owner

    The sentence was written for djpm version 4.0. See the changelog for the current support status, which is now Dj 3.x, 4.x and 5.0.

  3. Shmuel Treiger

    Where do I find the changelog?

    which is now Dj 3.x, 4.x and 5.0.

    Meaning django-postman supports these three versions of Django?

  4. Log in to comment