url = 'http://www.example.com/path/to/myview/123'
view, params = decompose(url)
# now view="MyView", params=('123',)
How can it be done?
from django.core import urlresolvers
match = urlresolvers.resolve(urlsplit(url).path)
view = match.func
params = math.args