title: i need to show some data in table but those data's are not in a same table ,how to show that data in one table in django
body: <p>Views.py</p>
  <pre><code>def meterstatistics(request):
      varr = Meters_table.objects.all()
      vark = Meter_Data_table.objects.all()
      Lastkwh = Meter_Data_table.objects.last()
      Lasttime = Meter_Data_table.objects.last()
      d = {
          'Lastkwh': Lastkwh, 'Lasttime': Lasttime, 'vark': vark, 'varr': varr
      }
      return render(request, 'meterstatistics.html', d)
  </code></pre>
  <p>models.py</p>
  <pre><code>class Meters_table(models.Model):
      Meter_id = models.AutoField(unique=True, editable=False, primary_key=True)
      Account_id = models.CharField(max_length=128)
      Location_id = models.CharField(max_length=150, help_text=&quot;(ID of the locations table)&quot;)
      RR_No = models.CharField(max_length=128)
      Meter_type = models.CharField(max_length=150, help_text=&quot;(Industry,Residential &amp; 
      Transformer)&quot;)
      Meter_make = models.CharField(max_length=150)
      Meter_model = models.CharField(max_length=150)
      Usage_type = models.CharField(
      max_length=150, help_text=&quot;(Industry,Residential &amp; Transformer)&quot;)
  
      def __str__(self):
              return self.Usage_type
  
  class Meter_Data_table(models.Model):
      id = models.AutoField(unique=True, editable=False, primary_key=True)
      Meter_id = models.CharField(max_length=150)
      IMEI_Number = models.CharField(max_length=150)
      KWH = models.CharField(max_length=128)
      KVAH = models.CharField(max_length=150)
      PF = models.CharField(max_length=150)
      BMD = models.CharField(max_length=128)
      Meter_time_stamp = models.DateTimeField(max_length=150)
      Receive_time_stamp = models.DateTimeField(max_length=150)
  
      def __str__(self):
              return self.Meter_id
  </code></pre>
  <p>HTML</p>
  <pre><code>                    &lt;table id=&quot;table&quot;&gt;
                      &lt;thead class=&quot;thead-light bg-primary&quot;&gt;
                          &lt;tr&gt;
  
                              &lt;th scope=&quot;col&quot;&gt;Meter_id&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;DCU IMEI&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;RR No&lt;/th&gt;
  
                              &lt;th scope=&quot;col&quot;&gt;Last KWH&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;PF&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;Last Meter Time Stamp&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;Location&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;Frequency&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;Relay&lt;/th&gt;
                              &lt;th scope=&quot;col&quot;&gt;Action&lt;/th&gt;
                          &lt;/tr&gt;
                      &lt;/thead&gt;
                      &lt;tbody&gt;
  
                          &lt;tr&gt;
  
                              {% for i in vark %}
                              &lt;td&gt;{{i.Meter_id}}&lt;/td&gt;
                              &lt;td&gt;{{i.IMEI_Number}}&lt;/td&gt;
  
                              &lt;td&gt;{{i.RR_No}}&lt;/td&gt;
                              
                              &lt;td&gt;{{i.KWH }}&lt;/td&gt;
                              &lt;td&gt;{{i.PF}}&lt;/td&gt;
                              &lt;td&gt;{{i.Meter_time_stamp }}&lt;/td&gt;
  
  
                              &lt;td&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;/td&gt;
  
                              &lt;td&gt;&lt;label class=&quot;switch&quot;&gt;
                                      &lt;input type=&quot;checkbox&quot;&gt;
                                      &lt;span class=&quot;slider round&quot;&gt;&lt;/span&gt;
                                  &lt;/label&gt;&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;a href=&quot;{% url 'graph' %}&quot;&gt;&lt;i style=&quot;font-size: 30px;&quot; class=&quot;fa fa-eye&quot;
                                          aria-hidden=&quot;true&quot;&gt;&lt;/i&gt; &lt;/a&gt;
                                  &lt;a href=&quot;metertableedit/{{i.Meter_id}}&quot;&gt;&lt;i style=&quot;font-size: 30px;&quot;
                                          class=&quot;fa fa-pencil-square-o&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                                  &lt;!-- &lt;a href=&quot;delmetertable/{{i.Meter_id}}&quot;&gt;&lt;i style=&quot;font-size: 30px;&quot;
                                          class=&quot;fa fa-trash&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;/a&gt; --&gt;
                                  &lt;!-- &lt;/button&gt; --&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                      {% endfor %}
  
                      &lt;/tbody&gt;
                  &lt;/table&gt;
  </code></pre>
  <p>I need to show this all data's in web page but those data's not in a single table those are different table data using for loop only one table is possible</p>
  <p><a href="https://i.stack.imgur.com/uFivb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFivb.png" alt="enter image description here" /></a></p>
  <p>and how to join that table AND  how to show the data in the webpage table
  without using for loop inside for loop.</p>
  <h1>Than you ....!</h1>