AlexandruC
AlexandruC

Reputation: 3637

Name of view inside decorator_from_middleware class

While using this implementation for logging events by view I came across the need to get the name of the view. How do you do that ?

Upvotes: 0

Views: 190

Answers (1)

Hedde van der Heide
Hedde van der Heide

Reputation: 22449

you can get the resolved url from the request object

request.resolver_match.view_name

Upvotes: 1

Related Questions