Given an url like:
http://127.0.0.1:8000/admin/foo/bar/
How can I access the bar variable from the request, using the request.resolver_match.kwargs ?
What kwarg does the admin give too bar?
Tried different keys like class, content_type, slug, model, but none of them work.
EDIT:
It seems the correct kwarg is model_name which is returning None, however. I managed to extract the model name using:
request.resolver_match.url_name.split('_')[1]
But wondering if there is a more direct way.