title: attribute error method object has no attribute
body: <p>Im new to Django Framework and i'm taking an online course on LinkedIn Learning. I am using a newer version of python/django so I run into some syntax problems.</p>
  
  <p>my python version is 3.5.4rc1.
  my django version is 1.11.4</p>
  
  <p>I created a model in models.py for an inventory:</p>
  
  <pre><code>class Item(models.Model):
      titel = models.CharField(max_length=200)
      omschrijving = models.TextField()
      aantal = models.IntegerField()
  </code></pre>
  
  <p>This is the code in my views.py file:</p>
  
  <pre><code>from django.shortcuts import render
  from django.http import Http404
  
  from inventory.models import Item
  
  def index(request):
      items = Item.objects.exclude(aantal=0)
      return render (request, 'inventory/index.html', {
          'items': items,
      })
      return HttpResponse('&lt;p&gt;In index view&lt;/p&gt;')
  
  def item_detail(request, id):
      try:
          item = Item.objects.get.id=(id) #THIS ONE CAUSES PROBLEM???
      except Item.DoesNotExist:
          raise Http404('Dit item bestaat niet')
      return render(request, 'inventory/item_detail.html', {
          'item': item,
      })
  </code></pre>
  
  <p>In the browser the localhost:8000 shows homepage as expected.
  localhost:8000/item/1/ gives error:</p>
  
  <pre><code>AttributeError at /item/1/
  'method' object has no attribute 'id'
  Request Method: GET
  Request URL:    http://localhost:8000/item/1/
  Django Version: 1.11.4
  Exception Type: AttributeError
  Exception Value:    
  'method' object has no attribute 'id'
  Exception Location: 
  C:\Users\info_000\Desktop\django\mysite\inventory\views.py in item_detail, line 15
  </code></pre>
  
  <p>Please Help!</p>