title: why does my data not appear whenever i reload the page
body: <p>i made a search function for getting date from my data in django, but when i refreshed, all the data from my table is gone</p>
  <p>this is my views.py</p>
  <pre><code>def index(request):
  info = Info.objects.all()
  query = request.GET.get(&quot;q&quot;)
  if query:
      info = info.filter(
          Q(Fname__icontains=query) |
          Q(Diagnosis__icontains=query)
      ).distinct()
      return render(request, 'index.html', {'info': info})
  else:
      return render(request, 'index.html', {'info': info})
  </code></pre>
  <p>this is what is showing in my
  <a href="https://i.stack.imgur.com/wC3Cx.png" rel="nofollow noreferrer">website</a></p>
  <p>my model.py</p>
  <pre><code>class Info(models.Model):
  Fname = models.CharField(max_length=30)
  Lname = models.CharField(max_length=30)
  Mname = models.CharField(max_length=30)
  DOB = models.DateField(auto_now_add=False, auto_now=False, blank=True)
  Age = models.IntegerField(blank=True, null=True)
  Address = models.CharField(max_length=30)
  DateIn = models.DateField(auto_now_add=False, auto_now=False, blank=True)
  DateOut = models.DateField(auto_now_add=False, auto_now=False, blank=True)
  Diagnosis = models.CharField(max_length=30)
  Physician = models.CharField(max_length=30)
  
  def get_absolute_url(self):
      return reverse('patient_info:index.html', kwargs={'pk': self.pk})
  
  def __str__(self):
      return self.Lname + ' ' + self.Fname
  </code></pre>
  <p>and my urls.py</p>
  <pre><code>from django.urls import path
  from . import views
  
  urlpatterns = [
      #patient_info/
      path('', views.index, name='index'),
      #patient_info/add
      path('add/', views.PatientCreate.as_view(), name='patient-add'),
      #patient_info/edit/pk
      path('edit/&lt;int:pk&gt;/', views.PatientUpdate.as_view(), name='patient-edit'),
      #patient_info/delete/pk
      #path('delete/&lt;int:pk&gt;/', views.PatientDelete.as_view(), name='patient-delete'),
  ]
  </code></pre>
  <p>please help, thank you</p>