title: id(number) path in urls
body: <p>I am new to django</p>
  
  <p>In urls.py, I set path like this. I tried to create a page with urls: localhost:8000/topics/1/ </p>
  
  <pre><code>urlpatterns = [
      path('topics/(?P&lt;topic_id&gt;\d+)/', views.topic, name='topic'),
  ]
  </code></pre>
  
  <p>In views.py. Code is this:</p>
  
  <pre><code>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>I got error 404 when enter localhost:8000/topics/1/.</p>
  
  <p>topics/(?P\d+)/ [name='topic']<p>
  The current path, topics/1/, didn't match any of these.
  <P>But the correct urls turns out to be: localhost:8000/topics/(%3FP1%5Cd+)/
  <P>Is there something wrong with the path in urls or what's the problem?</p>