title: Django - Python - URL didn't match any of these
body: <p>When I write code like this without <code>.html</code> in the end of <code>about/</code>:</p>
  
  <pre><code>from django.urls import path
  from . import views
  
  urlpatterns = [
      path('', views.index, name='index'),
      path('about/', views.about, name='about'),
      path('contact/', views.contact, name='contact'),
      path('categories/', views.categories, name='categories'),
      path('docAdd/', views.docAdd, name='docAdd')
  ]
  </code></pre>
  
  <p>I get errors when click on about in the navbar of my webpage, error in that case is : </p>
  
  <blockquote>
    <p>" The current path, about.html, didn't match any of these." But when I change about/ to about.html/ then I can click on about in navbar and page opens, but when I switch from about to contact in navbar I get error like: "The current path, about.html/contact.html, didn't match any of these." </p>
  </blockquote>
  
  <p>This is the code with <code>.html</code> suffix: </p>
  
  <pre><code>from django.urls import path
      from . import views
  
      urlpatterns = [
          path('', views.index, name='index'),
          path('about.html/', views.about, name='about'),
          path('contact.html/', views.contact, name='contact'),
          path('categories.html/', views.categories, name='categories'),
          path('docAdd.html/', views.docAdd, name='docAdd')
      ]
  </code></pre>
  
  <p>views.py code:</p>
  
  <pre><code>from django.shortcuts import render
  from . models import Document
  
  def index(request):
      return render(request, 'index.html')
  
  def about(request):
      return render(request, 'about.html')
  
  def contact(request):
      return render(request, 'contact.html')
  
  def categories(request):
      return render(request, 'categories.html')
  
  def docAdd(request):
      return render(request, 'docAdd.html')
  </code></pre>
  
  <p>This is the error when I click on about in navbar two times, when I have <code>.html</code>suffix with about/ in urls.py:</p>
  
  <pre><code>Page not found (404)
  Request Method: GET
  Request URL:    http://localhost:8000/about.html/about.html
  Using the URLconf defined in thesisProject.urls, Django tried these URL patterns, in this order:
  
  admin/
  [name='index']
  about.html/ [name='about']
  contact.html/ [name='contact']
  categories.html/ [name='categories']
  docAdd.html/ [name='docAdd']
  ^media/(?P&lt;path&gt;.*)$
  The current path, about.html/about.html, didn't match any of these.
  </code></pre>
  
  <p>This is the error when I click on about in navbar one time, when I have dont have <code>.html</code>suffix with about/ in urls.py:</p>
  
  <pre><code>Page not found (404)
  Request Method: GET
  Request URL:    http://localhost:8000/about.html/about.html
  Using the URLconf defined in thesisProject.urls, Django tried these URL patterns, in this order:
  
  admin/
  [name='index']
  about.html/ [name='about']
  contact.html/ [name='contact']
  categories.html/ [name='categories']
  docAdd.html/ [name='docAdd']
  ^media/(?P&lt;path&gt;.*)$
  The current path, about.html, didn't match any of these.
  </code></pre>
  
  <p>Code for navbar in index.html:</p>
  
  <pre><code>      &lt;div class="collapse navbar-collapse" id="ftco-nav"&gt;
          &lt;ul class="navbar-nav ml-auto"&gt;
            &lt;li class="nav-item active"&gt;&lt;a href="index.html" class="nav-link"&gt;Home&lt;/a&gt;&lt;/li&gt;
            &lt;li class="nav-item"&gt;&lt;a href="about.html" class="nav-link"&gt;About&lt;/a&gt;&lt;/li&gt;
            &lt;li class="nav-item"&gt;&lt;a href="categories.html" class="nav-link"&gt;Categories&lt;/a&gt;&lt;/li&gt;
            &lt;li class="nav-item"&gt;&lt;a href="docAdd.html" class="nav-link"&gt;Add New Documents&lt;/a&gt;&lt;/li&gt;
            &lt;li class="nav-item cta"&gt;&lt;a href="contact.html" class="nav-link"&gt;&lt;span&gt;Get in touch&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/nav&gt;
    &lt;!-- END nav --&gt;
  </code></pre>
  
  <p>I can't seem to solve this, please help.</p>