title: Django issubclass() arg 1 must be a class error in insering TabularInline at admin page
body: <p>I have these models in Django 1.5</p>
  
  <pre><code>class Number(models.Model):
      number = models.CharField("Patient's Number", max_length=12, unique=True)
      created = models.DateTimeField("Date created", auto_now=True)
      created.editable = True
  
  class Appointment(models.Model):
      to_number = models.ForeignKey(Number)
      message = models.CharField("Message", max_length=160)
      send_on = models.DateTimeField("Date/Time to send the message")
      email = models.CharField("Email to forward the response to", max_length=254, blank=True)
      reply_to = models.CharField("Phone number to forward the response to", max_length=12, blank=True)
  
      created = models.DateTimeField("Date created", auto_now=True)
      created.editable = True
  
  class MyLog(models.Model):
      to_number = models.CharField("To Number", max_length=12, blank=True)
      from_number = models.CharField("From Number", max_length=12, blank=True)
      email = models.CharField("Email to forward the response to", max_length=254, blank=True)
      message_id = models.CharField("Message ID", max_length=66)
      message_content = models.CharField("Message Content", max_length=160)
      message_status = models.CharField("Message status per Twilio", max_length=50)
  
      created = models.DateTimeField('Date created', auto_now=True)
      created.editable = True
  </code></pre>
  
  <p>I am trying to see <code>Appointment</code> as part of <code>Number</code>'s view (inline), so I follow <a href="https://docs.djangoproject.com/en/dev/intro/tutorial02/#adding-related-objects" rel="nofollow">Django tutorial part 2</a> and wrote this for my <code>admin.py</code>:</p>
  
  <pre><code>from django.contrib import admin
  from sms.models import Number, Appointment, MyLog
  
  class AppointmentInline(admin.TabularInline):
      model = Appointment
      exclude = ('created',)
  
  class NumberAdmin(admin.ModelAdmin):
      list_display = ('id', 'number', 'created',)
      list_display_links = ('id',)
      list_editable = ('number',)
      search_fields = ['number']
      save_on_top = True
      readonly_fields = ('created',)
      inlines = ['AppointmentInline',] # SEEMS LIKE THIS LINE IS CAUSING THE PROBLEM
  
  class AppointmentAdmin(admin.ModelAdmin):
      fieldsets = (
          ('Essential Information', {
              'fields': ('to_number', 'message', 'send_on', 'reply_to', 'email'),
              'classes': ('wide', 'extrapretty')}),
          ('Non-Essential Information', {
              'fields': ('created',),
              'classes': ('collapse',)}),
          )
      list_display =  ('to_number', 'message', 'send_on', 'reply_to', 'email',)
      list_display_links = ('to_number',)
      list_editable = ('message', 'send_on', 'reply_to', 'email',)
      search_fields = ['to_number__number', 'message', 'reply_to', 'email']
      save_on_top = True
      readonly_fields = ('created',)
  
  class MyLogAdmin(admin.ModelAdmin):
      list_display = ('to_number', 'from_number', 'email', 'message_content', 'message_status', 'created',)
      fields = ('to_number', 'from_number', 'email', 'message_content', 'message_status', 'created',)
      search_fields = ['to_number', 'from_number', 'email', 'message_content', 'message_status']
      readonly_fields = ('to_number', 'from_number', 'email', 'message_content', 'message_status', 'created',)
  
  admin.site.register(Number, NumberAdmin)
  admin.site.register(Appointment, AppointmentAdmin)
  admin.site.register(MyLog, MyLogAdmin)
  </code></pre>
  
  <p>But now I am getting the following error whenever I try to view <code>Number</code> via admin page:</p>
  
  <pre><code>TypeError at /admin/sms/number/
  ...
  Exception Type:     TypeError
  Exception Value:    
  
  issubclass() arg 1 must be a class
  
  Exception Location:     /home/phyo/.virtualenvs/t4stest/lib/python2.7/site-packages/django/contrib/admin/validation.py in validate, line 179
  Python Executable:  /usr/bin/uwsgi
  </code></pre>
  
  <p>I'm new to Django and have looked around the internet (Googled) quite a bit to figure out what I'm doing wrong here to cause such error. But I still couldn't figure this out after struggling with it for a few hours. If someone could help me explain what mistake I'm making here, I would really appreciate it. My goal is to be able to see related <code>Appointment</code> entries whenever I view <code>Number</code> via Django admin page. Thank you for your help.</p>