title: how to make django dynamic URL works properly with django form
body: <p>This is my form </p>
  
  <pre><code>&lt;form action="{%url 'topicname' %}" method="GET"&gt;
                &lt;input type="search" placeholder="Search topics" name="searchtopic"&gt;
                &lt;button type="submit"&gt;Search&lt;/button&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>This is my View</p>
  
  <pre><code>def searchtopic(request):
      if request.method == 'GET':
          mysearchtopic = request.GET['searchtopic']
  
          mydata = myhashtaglist.objects.filter(slug = mysearchtopic)
          context = {
              'mydata':mydata,
              }
      return render(request, 'hzone/result.html',context)
  </code></pre>
  
  <p>This is my result.html page</p>
  
  <pre><code>{% for m in mydata %}
  &lt;a href="{% url 'topicname' m.slug %}"&gt;{{ m.title }}&lt;/a&gt;
  {% endfor %}
  </code></pre>
  
  <p>This is my urls.py</p>
  
  <pre><code>urlpatterns = [
      path('', views.apphome, name = 'homepage'),
      path('topic/', views.searchtopic, name = 'topicname'),  
  ]
  </code></pre>
  
  <p>This is my model</p>
  
  <pre><code>class myhashtaglist(models.Model):
      title = models.CharField(max_length = 200)
      slug = models.SlugField(max_length = 150, null=True, blank = True)
      topicdetails = models.TextField(max_length = 500)
  </code></pre>
  
  <p>what i want is whenever user click on any of the topic on result page this topic should open.
  my reult page looks like </p>
  
  <pre><code>intro to django
  django tutorial 1
  django tutorial 2
  django tutorial 3
  </code></pre>
  
  <p>but when i am clicking on any of the topic its not taking me to that topic.</p>