[Fixed]-How to recursively get absolute url from parent instance(s)?

1👍

So first of all your page view is not accepting path argument.

You need to change def page(request, slug): to def page(request, slug, path):. Also you need to rethink if you need that param in your url and in your view, because you don’t use it.

Further part might not be relevant

And one more thing, you forgot to put / between params in url

url(r'^(?P<path>.+)(?P<slug>[\w-]+)/$', views.page, name='details'),

should be

url(r'^(?P<path>.+)/(?P<slug>[\w-]+)/$', views.page, name='details')

Leave a comment