fengsp / django-grpc-framework

gRPC for Django.
https://djangogrpcframework.readthedocs.io/
Apache License 2.0
390 stars 52 forks source link

attribute adjustment requires_system_checks #39

Open deborahohanne opened 2 years ago

deborahohanne commented 2 years ago

FIX: fix for requires_system_checks attribute as in Django version 4.1 there was a change to this attribute in the file

django/core/management/base.py

at the link https://github.com/django/django/commit/1cb495074f6d983096a015736fed16176588cd33#

the change is described,

the attribute previously received a boolean value, but has been changed to receive a list or tuple

"Using a boolean value for requires_system_checks is "
                "deprecated. Use '__all__' instead of True, and [] (an empty "
                "list) instead of False.",

the change was performed and the requires_system_checks attribute now receives an empty list [] as False

AMontagu commented 2 years ago

Hi @deborahohanne

As this project look no more maintained I can advice you to use https://github.com/socotecio/django-socio-grpc/

It's support django 4.1 and a lot more functionnalities than django-grpc-framework. All are not documented but we will be working on it and do not hesitate to post issue if you face problem for using it.

nature-python commented 11 months ago

you can bypass this error by creating your own django command as the official grpcrunserver command of djangogrpcframework in your own app, just set the requires_system_checks="all"

class Command(BaseCommand):
    help = 'Starts a gRPC server.'

    # Validation is called explicitly each time the server is reloaded.
    requires_system_checks = "__all__"

    def add_arguments(self, parser):