(app_configs=None, **kwargs)
return messages
Check that DJSTRIPE_USE_NATIVE_JSONFIELD is set on Django > 3.1.

    This is only a suggestion, as existing installations need a migration path.
Check that DJSTRIPE_USE_NATIVE_JSONFIELD is set on Django > 3.1.
Check that DJSTRIPE_USE_NATIVE_JSONFIELD is set on Django > 3 . 1 .
def check_native_jsonfield_set_on_recent_django_versions(app_configs=None, **kwargs):
    """
    Check that DJSTRIPE_USE_NATIVE_JSONFIELD is set on Django > 3.1.

    This is only a suggestion, as existing installations need a migration path.
    """

    messages = []

    # This error check is skipped on Django < 3.1+, because the native JSONField
    # was not available outside of Postgres engines then.
    if django.VERSION < (3, 1):
        return messages

    # NOTE: Not using app_settings.USE_NATIVE_JSONFIELD.
    # Only display this warning if the setting is unset.
    if not hasattr(settings, "DJSTRIPE_USE_NATIVE_JSONFIELD"):
        # TODO: Give more details on the migration path
        messages.append(
            checks.Warning(
                "DJSTRIPE_USE_NATIVE_JSONFIELD is not set.",
                hint=(
                    "On Django 3.1+, setting DJSTRIPE_USE_NATIVE_JSONFIELD = True is "
                    "recommended.\nPre-existing dj-stripe installations may require a "
                    "migration, in which case you may want to set it to False."
                ),
                id="djstripe.W005",
            )
        )

    return messages
def check_native_jsonfield_set_on_recent_django_versions ( app_configs = None , * * kwargs ) : messages = [ ] # This error check is skipped on Django < 3.1+, because the native JSONField # was not available outside of Postgres engines then. if django . VERSION < ( 3 , 1 ) : return messages # NOTE: Not using app_settings.USE_NATIVE_JSONFIELD. # Only display this warning if the setting is unset. if not hasattr ( settings , "DJSTRIPE_USE_NATIVE_JSONFIELD" ) : # TODO: Give more details on the migration path messages . append ( checks . Warning ( "DJSTRIPE_USE_NATIVE_JSONFIELD is not set." , hint = ( "On Django 3.1+, setting DJSTRIPE_USE_NATIVE_JSONFIELD = True is " "recommended.\nPre-existing dj-stripe installations may require a " "migration, in which case you may want to set it to False." ) , id = "djstripe.W005" , ) ) return messages