title: How to get an integer, not long int in Django
body: <p>ive got this code on my project</p>
  
  <pre><code>&lt;p&gt; &lt;li&gt;&lt;a href="{% url 'detail' prod.item_code_id %}"&gt; {{ prod.name }} &lt;/a&gt;&lt;/li&gt; &lt;/p&gt;
  </code></pre>
  
  <p>and getting this error</p>
  
  <p>"Reverse for 'detail' with arguments '(1L,)' and keyword arguments '{}' not found. 0 pattern(s) tried: []"</p>
  
  <p>prod.item_code_id is supposed to return an int but its getting long int.
  i tried </p>
  
  <pre><code>def get_product_item_code_id(self):
    return range(self.product_item_code_)id)
  </code></pre>
  
  <p>which came from a same question here but im getting [0]. [0,1]. or im using the range wrong?</p>
  
  <p>here is my urls.py for the app inventory</p>
  
  <pre><code>urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^(?P&lt;item_code_id&gt;\d+)/$', views.detail, name='product')
  ]
  </code></pre>
  
  <p>and here's for the project</p>
  
  <p>url(r'^inventory/', include('inventory.urls')),</p>