For instance, we have urls.py like this:
1 | (r’^insurances/’, include(‘insurances.urls’, namespace="insurances")), |
Then we want to have slug on parent of apps by :
1 | /insurances/slug |
Then in our urls.py in apps:
1 | url(r’^(?P<slug>[-w]+)/$’, ‘details’, name="details"), |
Done! 😀