1

What is the difference between

1. url(r'^$', views.Home.as_view(), name='home'),

and

2. url(r'^.*', views.Home.as_view(), name='home'),

in view.py:

class Home(TemplateView):
    template_name = "index.html"

Output of 1 is it will redirect only to index.html when clicked on the other it says

Not Found
The requested resource was not found on this server. 

output of 2nd is: it shows UI pages but backgroup django application apis doesnt execute.

georgeawg
  • 48,608
  • 13
  • 72
  • 95
geek
  • 794
  • 3
  • 16
  • 41

0 Answers0