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

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -