title: Page not found (404): django cannot match the path
body: <p>I don't understand why I am getting a 4040 error while it seems I have defiend everything correctly. The <code>Ticket</code> model class has instances saved in the database so <code>pk</code> from 1 to 5 also exists. The <code>html</code> template is the simplest possible just to figure out why django cannot get and render the requested instance. Note that I can see the instances in the <code>admin</code> page and also other paths like adding new ticket etc are working fine. Any help is appreciated:</p>
  
  <p><strong>the path/page that I am trying to get:</strong></p>
  
  <pre><code>http://127.0.0.1:8000/ticket/1/
  </code></pre>
  
  <p><strong>app: urls.py</strong></p>
  
  <pre><code>from . import views
  
  urlpatterns = [
      url(r'^$', views.home, name='home'),
      url(r'ticket/&lt;int:pk&gt;/', views.ticket_detail, name='ticket_detail'),
  ]
  </code></pre>
  
  <p><strong>project: urls.py</strong></p>
  
  <pre><code>from django.conf.urls import url,include
  from django.contrib import admin
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url(r'', include('mmrapp.urls')), 
  ]
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def ticket_detail(request, pk):
      ticket=get_object_or_404(Ticket,pk=pk)
      return render(request,'mmrapp/ticket_detail.html',{'ticket':ticket})
  </code></pre>
  
  <p><strong>html</strong></p>
  
  <pre><code>{% extends 'mmrapp/__l_single_column.html' %}
  {% load static %}
  
  {% block main_col %}
      &lt;div class="ticket"&gt;
          &lt;h2&gt;Ticket: {{ticket.pk}}&lt;/h2&gt;
      &lt;/div&gt;  
  
  {% endblock main_col %}
  </code></pre>