title: AttributeError: 'list' object has no attribute 'all' when connecting my model to admin
body: <p>Getting an <code>'list' object has no attribute all</code> error based on my function in my admin class.</p>
  <pre><code>    def get_stocks(self, obj):
          return &quot;\n&quot;.join([s.stock_list for s in obj.stock_list.all()])
  </code></pre>
  <p>The error seems very trivial, in fact I know what the problem is, but I don't get why Im getting the error for this specific function and not the one above, aka <code>def get_users()</code></p>
  <p>Here is my admin.py file</p>
  <pre><code>@admin.register(models.Bucket)
  class BucketAdmin(admin.ModelAdmin):
   
      list_display = ('id','owner','category', 'get_users', 'name', 'created',
                      'slug','stock_count','get_stocks', 'about')
      prepopulated_fields = {'slug': ('name',), }
  
  
      def get_users(self, obj):
          return &quot;\n&quot;.join([u.user_name for u in obj.users.all()])
          print(u)
      
      def get_stocks(self, obj):
          return &quot;\n&quot;.join([s.stock_list for s in obj.stock_list.all()])
  </code></pre>
  <p>Here is the model in question</p>
  <pre><code>class Bucket(models.Model):
  
      options = (
          ('personal', 'Personal'),
          ('social', 'Social'),
      )
  
  
      class BucketObjects(models.Manager):
          def get_queryset(self):
              return super().get_queryset().filter(Bucket.owner)
  
      owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='buckets')
      users = models.ManyToManyField(settings.AUTH_USER_MODEL)
      category = models.CharField(max_length=30, choices=options)
      name = models.CharField(max_length=35)
      created = models.DateTimeField(default=timezone.now)
      slug = models.SlugField(unique=True, blank=True, null=True) 
      stock_count = models.IntegerField(blank=True, null=True)
      stock_list = ArrayField(models.CharField(max_length=6,null=True),size=30,null=True)
      about = models.CharField(max_length=75)
  
      objects = models.Manager()
      bucketobjects = BucketObjects()
  
      class Meta:
          ordering = ('-created',)
  
      def total_stocks_calc(self):
          self.stock_count = Bucket.objects.aggregate(Sum('stock_list', distinct=True))
          self.save()
  
      def get_absolute_url(self):
          return reverse(&quot;bucket:bucket-view&quot;, kwargs={&quot;slug&quot;: self.slug})
  
      def __unicode__(self):
          return self.stock_list
  
  </code></pre>
  <p>Full TraceBack:</p>
  <pre><code>File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/db/models/options.py&quot;, line 575, in get_field
      return self.fields_map[field_name]
  KeyError: 'get_stocks'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py&quot;, line 265, in lookup_field
      f = _get_non_gfk_field(opts, name)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py&quot;, line 296, in _get_non_gfk_field
      field = opts.get_field(name)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/db/models/options.py&quot;, line 577, in get_field
      raise FieldDoesNotExist(&quot;%s has no field named '%s'&quot; % (self.object_name, field_name))
  django.core.exceptions.FieldDoesNotExist: Bucket has no field named 'get_stocks'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/core/handlers/exception.py&quot;, line 47, in inner
      response = get_response(request)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/core/handlers/base.py&quot;, line 202, in _get_response
      response = response.render()
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/response.py&quot;, line 105, in render
      self.content = self.rendered_content
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/response.py&quot;, line 83, in rendered_content
      return template.render(context, self._request)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/backends/django.py&quot;, line 61, in render
      return self.template.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 170, in render
      return self._render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 162, in _render
      return self.nodelist.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 938, in render
      bit = node.render_annotated(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 905, in render_annotated
      return self.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/loader_tags.py&quot;, line 150, in render
      return compiled_parent._render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 162, in _render
      return self.nodelist.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 938, in render
      bit = node.render_annotated(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 905, in render_annotated
      return self.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/loader_tags.py&quot;, line 150, in render
      return compiled_parent._render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 162, in _render
      return self.nodelist.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 938, in render
      bit = node.render_annotated(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 905, in render_annotated
      return self.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/loader_tags.py&quot;, line 62, in render
      result = block.nodelist.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 938, in render
      bit = node.render_annotated(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 905, in render_annotated
      return self.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/loader_tags.py&quot;, line 62, in render
      result = block.nodelist.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 938, in render
      bit = node.render_annotated(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/base.py&quot;, line 905, in render_annotated
      return self.render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/templatetags/base.py&quot;, line 33, in render
      return super().render(context)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/template/library.py&quot;, line 214, in render
      _dict = self.func(*resolved_args, **resolved_kwargs)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py&quot;, line 341, in result_list
      'results': list(results(cl)),
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py&quot;, line 317, in results
      yield ResultList(None, items_for_result(cl, res, None))
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py&quot;, line 308, in __init__
      super().__init__(*items)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py&quot;, line 233, in items_for_result
      f, attr, value = lookup_field(field_name, result, cl.model_admin)
    File &quot;/home/andres/stockbuckets.io/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py&quot;, line 274, in lookup_field
      value = attr(obj)
    File &quot;/home/andres/stockbuckets.io/bucket/admin.py&quot;, line 18, in get_stocks
      return &quot;\n&quot;.join([s.stock_list for s in obj.stock_list.all()])
  AttributeError: 'list' object has no attribute 'all'
  </code></pre>
  <p>Why am I getting this error and how can I fix it? Thank you in advance.</p>