title: Reverse for 'update_task' with arguments '('',)' not found. 1 pattern(s) tried: ['update/(?P<update>[^/]+)/$']
body: <p>I am building a small CRUD project and stuck on a very basic thing which is an update. First I found it
  on stack overflow, google and Facebook as well but couldn't be able to find the solution so finally
  posting my problem here will all code.</p>
  <p>views.py:</p>
  <pre><code>from django.shortcuts import render, redirect, get_object_or_404, HttpResponseRedirect
  
  from .models import Task
  
  from .forms import TaskForm
  
  def tasks(request):
      task = Task.objects.all()
      if request.method == 'POST':
          form = TaskForm(request.POST)
          if form.is_valid():            
              form.save()
              return redirect('/')
      else:
          form = TaskForm()
      context = {
          'forms': form,
          'tasks': task
      }
      return render(request, 'task/task.html', context)
  
  
  def update_task(request, update):
      task = Task.objects.get(id=update)
      form = TaskForm(instance=task)
      if request.method == 'POST':
          form = TaskForm(request.POST, instance=task)
          if form.is_valid():
              form.save()
              return redirect('/')
      context = {
      'form': form
  }
      return render(request, 'task/update_task.html', context)
  </code></pre>
  <p>urls.py:</p>
  <pre><code>from django.urls import path
  
  from .views import tasks, update_task
  
  urlpatterns = [
      path('', tasks, name='tasks'),
      path('update/&lt;str:update&gt;/', update_task, name='update_task'),
  ]
  </code></pre>
  <p>I am facing a problem in this section of update_task.html.</p>
  <p>my update_task.html:</p>
  <pre><code>&lt;form action=&quot;{% url 'update_task' form.id %}&quot; method=&quot;POST&quot;&gt;
      {% csrf_token %}
      {{ form }}
  &lt;/form&gt;
  &lt;input type=&quot;submit&quot; value=&quot;Update&quot;&gt;
  </code></pre>
  <p>tasks.html:</p>
  <pre><code>&lt;!DOCTYPE HTML&gt;
  {% load static %}
  {% load crispy_forms_tags %}
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;title&gt;ToDo App&lt;/title&gt;
      &lt;link rel=&quot;stylesheet&quot; href=&quot;{% static 'css/mystyles.css' %}&quot; type=&quot;text/css&quot;&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;ToDo App&lt;/h1&gt;
  &lt;form class=&quot;&quot; action=&quot;&quot; method=&quot;POST&quot;&gt;
      {% csrf_token %}
  &lt;div class=&quot;input&quot;&gt;
      {{ forms }}
  &lt;input type=&quot;submit&quot; value=&quot;Add&quot;&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  
  {% for task in tasks %}
      {% csrf_token %}
  &lt;div class=&quot;&quot;&gt;
      {{ forloop.counter }} - {{ task }}
      &lt;a class=&quot;btn btn-info&quot; type=&quot;button&quot; href=&quot;{% url 'update_task' task.id %}&quot;&gt;Update&lt;/a&gt;
  &lt;/div&gt;
  {% endfor %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>