After login user should be redirected to the ?next=%s
url. I want to check if specified url mapped to an existant view. There is reverse()
function for getting url by view, i need v.v.
So, i need the function that Django executes for url pattern match.
I see, the question is simple, but i could not find the answer in google.
from django.core.urlresolvers import resolve, Resolver404
try:
resolve(path)
except Resolver404:
'not found'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With