Since this code can be executed before the django app is fully initialized (for example if we import FilerFileField in our application model)
it will not be able to load the custome auth user model.
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'my_app.User' that has not been installed
Maybe we can just use TypeVar here for type hinting the user parameters instead!
For type hinting the user parameter in the filer/cache.py functions, a new change added to get the user model. https://github.com/django-cms/django-filer/blob/44255c8a15f8973f34420aa0c9c869e281d9d45e/filer/cache.py#L7
Since this code can be executed before the django app is fully initialized (for example if we import FilerFileField in our application model) it will not be able to load the custome auth user model.
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'my_app.User' that has not been installed
Maybe we can just use TypeVar here for type hinting the user parameters instead!