I need to return css files and js files according to specific logic. Clearly, static serve does not perform what I need. I have a view, whose render method uses logic to fin
Why don't you use Django staticfiles inside your view
from django.contrib.staticfiles.views import serve ... def view_function(request): return serve(request, 'absolute_path_to_file_name')