regex - django url regular expressions capture invalid url -


i want understand how create urls / regular expressions capture , redirect views patterns not match defined pattern.

i have pattern in url project looking waitlist. not match want direct project view, assuming caught second url below

 url(r'^waitlist/', include('waitlist.urls')),  url(r'^.*$', views.my_default_2), 

if user include url waitlist, should pass app url match , if no match pass through wild card, second line.

    url(r'^$', views.index, name='index')              url(r'^.*$', views.my_default), 

is correct way capture invalid/ incorrect url input through project , app?

for project can override 404 view https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -