title: Django: NoReverseMatch at ' '. ' ' is not a valid view function or pattern name
body: <p>I am trying to retrieve data from form inputs and insert them into the model. But I receive this error:</p>
  
  <p>[Error NoReverseMatch. 'test-management/test/add_test/' is not a valid view function or pattern name.<a href="https://i.stack.imgur.com/7ZJo9.png" rel="nofollow noreferrer">1</a></p>
  
  <p><strong>The .html file that contain form.</strong></p>
  
  <pre><code>&lt;form class="form" method="POST" action="{% url 'test-management/test/add_test/' %}"&gt;
                          {% csrf_token %}
                          &lt;h2&gt;Add Test&lt;/h2&gt;
                          &lt;div class="card-body"&gt;
                              &lt;div class="form-group bmd-form-group"&gt;
                                  &lt;div class="input-group"&gt;
                                      &lt;p&gt;Name :&lt;/p&gt;
                                      &lt;input type="text" class="form-control" name="name" placeholder="Test Name..."&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div class="form-group bmd-form-group"&gt;
                                &lt;div class="input-group"&gt;
                                    &lt;p&gt;Type :&lt;/p&gt;
                                    &lt;input type="text" class="form-control" name="type" placeholder="Test Type..."&gt;
                                &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div class="form-group bmd-form-group"&gt;
                                  &lt;div class="input-group"&gt;
                                      &lt;p&gt;Date :&lt;/p&gt;
                                      &lt;input type="date" class="form-control" name="date" placeholder="Test Date..."&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-footer justify-content-right"&gt;
                              &lt;input type="submit" value="Add"&gt;
                              &lt;a href="." class="btn btn-primary btn-link btn-wd btn-lg" id="close"&gt;Close&lt;/a&gt;
                              &lt;a href="#pablo" class="btn btn-primary btn-link btn-wd btn-lg" id="add_new"&gt;Add &amp; New&lt;/a&gt;
                              &lt;a href="." class="btn btn-primary btn-link btn-wd btn-lg" id="add"&gt;Add&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
  </code></pre>
  
  <p>The error might be caused by action of the form, but I don't know how to correct it.</p>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>from test_management.views import (test_list, subject_list, topic_list, question_list, import_question, add_test)
  
  urlpatterns = [
      url(r'^test-management/test/add_test/', add_test, name='add_test'),
  ]+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  from django.http import HttpResponse
  from django.http import HttpResponseRedirect
  from .models import Test
  
  def add_test(request):
      if request.method == 'POST':
          test_name = request.POST.get('name')
          test_type = request.POST.get('type')
          test_date = request.POST.get('date')
          test_obj = Test(test_name = test_name, test_type = test_type, test_date = test_date)
          test_obj.save()
          tests = Test.objects.all()
      return render(request, 'test_list.html', {'tests' : tests})
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Test(models.Model):
      # candidate_id = models.ForeignKey('Candidate', on_delete=models.CASCADE)
      # admin_id = models.OneToOneField('Admin', on_delete=models.CASCADE)
      test_name = models.TextField(max_length=45)
      test_type = models.TextField(max_length=45)
      test_date = models.DateField()
      create_date = models.DateTimeField(auto_now_add=True)
  
      def __str__(self): 
          return self.test_name
  </code></pre>
  
  <p>Thank for helping me solving the error!</p>