title: django.urls.exceptions.NoReverseMatch: Reverse for 'new_entry' with arguments '(1,)' not found. 1 pattern(s) tried: ['new_entry/$']
body: <p>I am currently working on a tutorial in the "Python Crash course" Book.</p>
  
  <p>The tutorial is about creating a "Learning Log" Webapp with Django. The idea of the app is to allow users to: 1. create "Topics" they have learned about 2. add "Entries" to those Topics, describing details they have learned specific to those topics</p>
  
  <p>I am currently stuck at editing an existing Entry form and receive an Error, when I run
  <a href="http://127.0.0.1:8000/topics/2/" rel="nofollow noreferrer">http://127.0.0.1:8000/topics/2/</a></p>
  
  <p>forms.py file</p>
  
  <pre><code>    from django import forms
      from .models import Topic,Entry
      class Topicform(forms.ModelForm):
           class Meta:
           model = Topic
           fields =['text']
           labels = {'text' :''}
      class Entryform(forms.ModelForm):
          class Meta:
          model = Entry
          fields =['text']
          labels = {'text' :''}
          widgets = {'text' : forms.Textarea(attrs={'cols':80})}
  </code></pre>
  
  <p>urls.py file</p>
  
  <pre><code>    from django.conf.urls import url
      from . import views
      app_name='learning_logs' 
      urlpatterns=[
        #Home page
      url(r'^$',views.index,name='index'),
        #Show all topics page
      url(r'^topics/$',views.topics,name='topics'), 
        #Detail page for a single topic
      url(r'^topics/(?P&lt;topic_id&gt;\d+)/$',views.topic,name='topic'),
        #Page for adding a new topic
      url(r'^new_topic/$',views.new_topic,name='new_topic'),
        #Page for adding a new entry
      url(r'^new_entry/$',views.new_entry,name='new_entry'),
        #Page for editing an entry
      url(r'^edit_entry/(?P&lt;entry_id&gt;\d+)/$',views.edit_entry,name='edit_entry'), 
  </code></pre>
  
  <p>]</p>
  
  <p>views.py file</p>
  
  <pre><code>    from django.http import HttpResponseRedirect
      from django.urls import reverse
      from django.shortcuts import render
      from .models import Topic,Entry 
      from .forms import Topicform, Entryform
      --snip--
      def edit_entry(request,entry_id):
          entry = Entry.objects.get(id=entry_id)
          topic=entry.topic
  
          if request.method != 'POST':
          # No data submitted; create a blank form
             form = Entryform(instance = entry)
          else:
          # Post data submitted;process data
             form = Entryform(request.POST,instance=entry)
             if form.is_valid():
                  form.save()
          return HttpResponseRedirect(reverse('learning_logs:topics',args=[topic.id]))
  
     context={'entry':entry,'topic':topic,'form':form}
     return render(request,'learning_logs/edit_entry.html',context)
  </code></pre>
  
  <p>edit_entry.html file</p>
  
  <pre><code>    {% extends "learning_logs/base.html" %}
  
      {% block content %}
  
      &lt;p&gt;&lt;a href="{% url 'learning_logs:topic' topic.id %}"&gt;{{ topic }}&lt;/a&gt;&lt;/p&gt;
  
      &lt;p&gt;Edit Entry:&lt;/p&gt;
      &lt;form action= "{%url 'learning_logs:edit_entry' entry.id %}" method = 'post'&gt;
          {%csrf_token %}
          {{form.as_p}}
      &lt;button name="submit"&gt;save changes&lt;/button&gt;
      &lt;/form&gt;
  
     {% endblock content %}
  </code></pre>
  
  <p>topic.html file</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;p&gt;
         &lt;a href="{% url 'learning_logs:new_entry' topic.id %}"&gt;Add new entry&lt;/a&gt;
      &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;p&gt;
              &lt;a href="{% url 'learning_logs:edit_entry' entry.id %}"&gt;edit entry&lt;/a&gt;
           &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>