title: Django model: TypeError: 'Manager' object is not callable
body: <p>I'm developing a Rest API with django. I have this model:</p>
  
  <pre><code>from django.db import models
  from devices.models import Device
  
  class Command(models.Model):
      id = models.AutoField(primary_key=True, blank=True)
      command_name = models.CharField(max_length=70, blank=False, default='')
      time = models.DateTimeField(auto_now_add=True, blank=True)
      timeout = models.TimeField(blank=True)
      command_status= models.IntegerField(blank=False)
      tracking = models.IntegerField(blank=False)
      result_description = models.CharField(max_length=200, blank=False, default='')
      ssid = models.CharField(max_length=31, blank=False, default='')
      device = models.ForeignKey(Device, on_delete=models.CASCADE)
  </code></pre>
  
  <p>in the views I have this part of code:</p>
  
  <pre><code>@csrf_exempt 
  def command_detail(request, rssid):
      try: 
      print("Heeeeeeeeeeeeeeeeeeeeeeeeelllo 1111 rssid: ", rssid)
      commands=Command.objects().filter(ssid=rssid)
      print("Heeeeeeeeeeeeeeeeeeeeeeeeelllo 2222")
      command=commands[0]
      except Command.DoesNotExist: 
      return HttpResponse(status=status.HTTP_404_NOT_FOUND) 
  </code></pre>
  
  <p>If I execute my server it works fine without any error but if I trie to test the corresponding server with curl like that: <code>curl -X POST http://127.0.0.1:8000/api/commands/cmdssid1?command_status=40</code> I get as curl result a so big html indicating an Internal Error in the server and in the django part I got those traces:</p>
  
  <pre><code>July 30, 2019 - 08:00:01
  Django version 1.10.1, using settings 'project-name.settings'
  Starting development server at http://127.0.0.1:8000/
  Quit the server with CONTROL-C.
  ('Heeeeeeeeeeeeeeeeeeeeeeeeelllo 1111 rssid: ', u'cmdssid1')
  Internal Server Error: /api/commands/cmdssid1
  Traceback (most recent call last):
    File "/path-to-home/.local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 39, in inner
      response = get_response(request)
    File "/path-to-home/.local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "/path-to-home/.local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/path-to-home/.local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
      return view_func(*args, **kwargs)
    File "/path-to-project/command/views.py", line 56, in command_detail
      commands=Command.objects().filter(ssid=rssid)
  TypeError: 'Manager' object is not callable
  [30/Jul/2019 08:00:06] "POST /api/commands/cmdssid1?command_status=40 HTTP/1.1" 500 74917
  </code></pre>
  
  <p>I made many searches and I investigated with some debugs but really not clear what's the main cause to fix the issue. </p>
  
  <p>Has any one an idea what's the cause of the error and how I can fix it?</p>