Reputation: 471
I am new to django and I am having problems with my views. I would like to get all the urls with the extension .html go to a view ...app.views.test
I have:
url(r'^\. html$',views.test)
Upvotes: 0
Views: 74
Reputation: 474151
Just check the ending:
url(r'\.html$', views.test)
Note that a dot needs to be escaped with a backslash since the dot has a special meaning:
'.' (Dot.)
In the default mode, this matches any character except a newline.
Upvotes: 3