I’ll keep this brief in case it’s been discussed before (I couldn’t find anything on it tbh).
I’ve been developing a multi-tenant project, and want to mount 3rd party apps at urls that include tenant info so as to set contexts for those apps (django-tenants based). Currently there is no (elegant) way of stripping path arguments and preventing them being passed to the app views.
This could be addressed with something like a ‘consume’ parameter on include() listing args to be extracted and attached to the request for consumption in middleware - or include() could just consume all params defined in its path() wrapper by default - when would you not want this? not sure.
This is an addressed need in some other frameworks (FastAPI and Rails both have ways of doing this).
I have had to resort to session level context which feels clumsy and prevents bookmarking.
I realise this would have implications for reverse() potentially needing to walk with knowledge of these params, but is it something that has been discussed/ dismissed/ considered?
Many thanks!