title: URLconf not matching URL patterns for loading a template
body: <p>Python/Django beginner here. I'm running into this error:</p>
  
  <blockquote>
    <p>Using the URLconf defined in learning_log.urls, Django tried these URL
    patterns, in this order: </p>
    
    <ol>
    <li><p>^admin/</p></li>
    <li><p>^$ [name='index'] </p></li>
    <li><p>^topics/$ [name='topics'] </p></li>
    <li><p>^topics/(?P\d+)/$ [name='topic'] </p></li>
    </ol>
    
    <p>The current URL, topics/% url 'learning_logs:topic' topic.id %}, didn't match any of these.</p>
  </blockquote>
  
  <p>When I am trying to load my topic template. Here is my template:</p>
  
  <pre><code>{% extends 'learning_logs/base.html' %}
  
  {% block content %}
  
  &lt;p&gt;Topic: {{ topic }}&lt;/p&gt;
  
  &lt;p&gt;Entries:&lt;/p&gt;
  &lt;ul&gt;
  {% for entry in entries %}
      &lt;li&gt;
          &lt;p&gt;{{ entry.date_added|date:'M d, Y H:i' }} &lt;/p&gt;
          &lt;p&gt;{{ entry.text|linebreaks }}&lt;/p&gt;
      &lt;/li&gt;
  {% empty %}
      &lt;li&gt;
          There are no entries for this topic yet.
      &lt;/li&gt;
  {% endfor %}
  &lt;/ul&gt;
  
  {% endblock content %}
  </code></pre>
  
  <p>This is my views.py:</p>
  
  <pre><code>from django.shortcuts import render
  from .models import Topic
  
  def index(request):
      '''The home page for Learning Log'''
      return render(request, 'learning_logs/index.html')
  
  def topics(request):
      '''Show all topics.'''
      topics = Topic.objects.order_by('date_added')
      context = {'topics': topics}
      return render(request, 'learning_logs/topics.html', context)
  
  def topic(request, topic_id):
      '''Show a single topic and all its entries.'''
      topic = Topic.objects.get(id=topic_id)
      entries = topic.entry_set.order_by('-date_added')
      context = {'topic': topic, 'entries': entries}
      return render(request, 'learning_logs/topic.html', context)
  </code></pre>
  
  <p>And this is my urls.py code:</p>
  
  <pre><code>'''Defines URL patterns for learning_logs.'''
  
  from django.conf.urls import url
  
  from . import views
  
  urlpatterns = [
      # Home page
      url(r'^$', views.index, name='index'),
  
      # Show all topics.
      url(r'^topics/$', views.topics, name='topics'),
  
      # Detail page for a single topic
      url(r'^topics/(?P&lt;topic_id&gt;\d+)/$', views.topics, name='topic')
  ]
  </code></pre>
  
  <p>I am using Python Crash Course: A Hands-On, Project-Based Introduction to Programming for my tutorials.</p>
  
  <p>Any help would be much appreciated.</p>