ResolverMatch and url pattern

62 views
Skip to first unread message

Melvyn Sopacua

unread,
Jul 10, 2018, 2:16:01 PM7/10/18
to django-d...@googlegroups.com

Hi,

 

I'm trying to implement a wrapper for Django's request to work with openapi-core. In this endavour I discovered that obtaining the pattern that matched with the current URL is not stored on ResolverMatch and I don't see any other way to obtain it from a Django HttpRequest.

 

I'm apparently not alone in this. And I'm wondering why it's not stored. I basically would have to setup a local url pattern cache tied to view name and resolve it again.

 

Is there a reason it's not stored on the resolver match?

--

Melvyn Sopacua

Tim Graham

unread,
Jul 10, 2018, 3:09:21 PM7/10/18
to Django developers (Contributions to Django itself)
There's an open ticket. Perhaps you would like to finish the patch.

Melvyn Sopacua

unread,
Jul 10, 2018, 4:32:04 PM7/10/18
to django-d...@googlegroups.com
On dinsdag 10 juli 2018 21:09:21 CEST Tim Graham wrote:
> There's an open ticket. Perhaps you would like to finish the patch.
>
> https://code.djangoproject.com/ticket/28766
> https://github.com/django/django/pull/9323

I will have a look.

--
Melvyn Sopacua
Reply all
Reply to author
Forward
0 new messages