title: Django BigIntegerField Can Not Be Displayed With def __unicode__(self):
body: <p><strong>UPDATE #2</strong>: <strong>I found the issue is with:</strong></p>
  
  <pre><code>def __unicode__(self):
      return self.thread_id
  </code></pre>
  
  <p><strong>How can I return the thread_id number for admin panel viewing with <code>thread_id = models.IntegerField(unique=True)</code>?</strong></p>
  
  <hr>
  
  <p>With Django 1.6 and postgres, when saving a entry I get:</p>
  
  <pre><code>TypeError at /admin/bot_data/threadvault/add/
  'int' object has no attribute '__getitem__'
  Request Method: POST
  Request URL:    http://10.14.213.69:8000/admin/bot_data/threadvault/add/
  Django Version: 1.6.2
  Exception Type: TypeError
  Exception Value:    
  'int' object has no attribute '__getitem__'
  Exception Location: /home/one/.virtualenvs/bot/local/lib/python2.7/site-pac
  kages/django/contrib/admin/models.py in log_action, line 19
      Python Executable:  /home/one/.virtualenvs/bot/bin/python
      Python Version: 2.7.3
  </code></pre>
  
  <p>Here is my models.py:</p>
  
  <pre><code>from django.db import models
  from django.contrib.auth import get_user_model
  from django.conf import settings
  from django.forms import ModelForm
  
  class UnassignedThread(models.Manager):
      def get_queryset(self):
          return super(UnassignedThread,
                  self).get_queryset().filter(
                          user_irc_name__isnull=True)
  
  def user_unicode_patch(self):
      return '%s %s' % (self.first_name, self.last_name)
  
  get_user_model().__unicode__ = user_unicode_patch
  
  class User(models.Model):
      user_ldap = models.ForeignKey(settings.AUTH_USER_MODEL,
              related_name='user_requester')
      user_irc_name = models.CharField(max_length="25")
      user_user_name = models.CharField(max_length="25")
  
  class ThreadVault(models.Model):
      thread_id = models.BigIntegerField(unique=True)
      url = models.CharField(max_length="200")
      author_username = models.CharField(max_length="50")
      author_name = models.CharField(max_length="50")
      forum_id = models.CharField(max_length="50")
      subject = models.CharField(max_length="200")
      reply_count = models.CharField(max_length=("3"))
      latest_post_date = models.CharField(max_length=("50"))
      user_irc_name = models.ForeignKey(User, null=True, blank=True)
  
      objects = models.Manager()
      unassigned_threads = UnassignedThread()
  
      def __unicode__(self):
          return self.thread_id
  </code></pre>
  
  <p><strong>However</strong>, if I change <code>thread_id = models.BigIntegerField(unique=True)</code> to <code>thread_id = models.CharField(unique=True,max_length="50")</code> the problem goes away. How come I can not use BigIntegerField and how can I make it work? I rather use integer type for quicker look up.</p>
  
  <p>UPDATE: Here is the log output:</p>
  
  <pre><code>[06/Mar/2014 11:09:37] "GET /admin/jsi18n/ HTTP/1.1" 200 2372
  Internal Server Error: /admin/bot_data/threadvault/add/
  Traceback (most recent call last):
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 432, in wrapper
      return self.admin_site.admin_view(view)(*args, **kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view
      response = view_func(request, *args, **kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 52, in _wrapped_view_func
      response = view_func(request, *args, **kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 198, in inner
      return view(request, *args, **kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 29, in _wrapper
      return bound_func(*args, **kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view
      response = view_func(request, *args, **kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in bound_func
      return func(self, *args2, **kwargs2)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/db/transaction.py", line 339, in inner
      return func(*args, **kwargs)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1133, in add_view
      self.log_addition(request, new_object)
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 600, in log_addition
      action_flag=ADDITION
    File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/django/contrib/admin/models.py", line 19, in log_action
      e = self.model(None, None, user_id, content_type_id, smart_text(object_id), object_repr[:200], action_flag, change_message)
  TypeError: 'int' object has no attribute '__getitem__'
  </code></pre>