title: array don't Access in the template
body: <p>I want to known the number of views in each separately Playlist where I can store the view number for each one in the array and later display it in the template but show me the array in the following in the template: </p>
  
  <pre><code>[1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  </code></pre>
  
  <p>Here the array is ​​repeated with Playlists and I can not move between the elements of the array</p>
  
  <p>Issue 2: I can not determine the number of views per person</p>
  
  <pre><code>
  def playlist_view(request,id):
      category = get_object_or_404(Category,pk=id)
      playlists = Playlist.objects.filter(category=category)
  
      views=list()
      for playlist in playlists:
          views.append(PlaylistView.objects.filter(playlist=playlist).count())
      print(views)
  
      return render(request, 'playlist.html',{'category': category,'playlists': playlists,'views':views})
  </code></pre>
  
  <pre><code>                    {% for playlist in playlists %}
                      {{ views }} :: {{ playlist.name }}
  
                          {% endfor %}
  </code></pre>
  
  <pre><code>def track_view(request,id_category,id_playlist):
      category = get_object_or_404(Category, pk=id_category)
      playlist= get_object_or_404(Playlist,pk=id_playlist)
  
      if not PlaylistView.objects.filter(playlist=playlist, session=request.session.session_key):
          x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
          if x_forwarded_for:
              ip = x_forwarded_for.split(',')[0]
          else:
              ip = request.META.get('REMOTE_ADDR')
          view = PlaylistView(playlist=playlist, ip=ip, created_dt=datetime.now(), session=request.session.session_key)
          view.save()
  </code></pre>
  
  <p>here is right access in the Array element But not access in same time playlists </p>
  
  <pre><code>      {% for view in views %}
                      {{ view }}
        {% endfor %}
  
        {% for playlist in playlists %}
                {{ views }} :: {{ playlist.name }}
        {% endfor %}
  </code></pre>
  
  <p>how to access in two Array in the same loop </p>