Assuming it can be done, what is the proper way to namespace two models in the same app, where both use slugs in the url but have different views and templates?
So can I do:
urls.py
url(r'^model1/', include('app.urls', appview4model1, namespace='app.model1')
url(r'^model2/', include('app.urls', appview4model2, namespace='app.model2')
app_name = "app.model1"
urlpatterns [ ....]
app_name = "app.model2"
urlpatterns [ ....]
Frankly, I want the shortest urls possible, so if there was a way to do this without putting 'model1' or 'model2' in the url, that would be great, but I'm not seeing a way around it - assuming the app_name = 'app.model1' thing even works.
Another option I thought of but don't know if possible:
try url(r'^(?P<slug>) )
except url(r'^modelname(?P<slug>) )
I've never seen anything like that, though. If it did work, I doubt it would fit inside urlpatterns[ ], but maybe I could put it after?
Or I could hack the code that handles url name collisions (once I find it)
Thanks!