title: TypeError: coercing to Unicode: need string or buffer, long found
body: <pre><code>class Movie(models.Model):
      movie_id = models.BigAutoField(primary_key=True)
      movie_name = models.CharField(max_length=128)
      movie_lang = models.CharField(max_length=36)
      director = models.CharField(max_length=72)
      producer = models.CharField(max_length=72)
      production_house = models.CharField(max_length=128)
      lead_actor = models.CharField(max_length=72)
      lead_actress = models.CharField(max_length=72)
      music_director = models.CharField(max_length=72)
      art_director = models.CharField(max_length=72)
      stunts = models.CharField(max_length=72)
      cinematography = models.CharField(max_length=72)
      costume_design = models.CharField(max_length=72)
      hair_stylist = models.CharField(max_length=72)  
  
      def __str__(self):
          return self.movie_name
  
  class Cover(models.Model):
      cover_id = models.BigAutoField(primary_key=True)
      cover_path = models.CharField(max_length=512)
      movie = models.ForeignKey('Movie',on_delete=models.CASCADE) 
  
      def __str__(self):
          return self.cover_id
  
      def unicode(self):
          return unicode(self.cover_path)
  
  
  
  
  #urls.py
  from django.conf.urls import url
  
  from . import views
  
  urlpatterns = [
      url(r'^(?P&lt;question_id&gt;[0-9]+)/$',views.movie,name='movie'),
      url(r'^vedio/',views.vedio,name='vedio'),
      url(r'^image/',views.image,name='image'),
      url(r'^$',views.index,name = 'index'),
  ]
  
  #views.py
  
  from django.shortcuts import render
  
  # Create your views here.
  from django.http import HttpResponse
  
  def index(request):
      return HttpResponse("Hello, world. You're at the movie station.")
  
  def movie(request,question_id):
      return HttpResponse("Welcome to movies page")
  
  def vedio(request):
      return HttpResponse("Welcome to vedios page")
  
  def image(request):
      return HttpResponse("Welcome to images page")
  </code></pre>
  
  <p>Environment:</p>
  
  <p>Request Method: POST
  Request URL: <a href="http://localhost:8000/admin/movieaware/cover/add/" rel="nofollow noreferrer">http://localhost:8000/admin/movieaware/cover/add/</a></p>
  
  <p>Django Version: 1.10.3
  Python Version: 2.7.12
  Installed Applications:</p>
  
  <pre><code>['movieaware.apps.MovieawareConfig',
   'django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles']
  Installed Middleware:
  ['django.middleware.security.SecurityMiddleware',
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware']
  </code></pre>
  
  <blockquote>
    <p>Traceback:</p>
    
    <p>File "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
      39.             response = get_response(request)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/core/handlers/base.py"
    in _get_response
      187.                 response = self.process_exception_by_middleware(e, request)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/core/handlers/base.py"
    in _get_response
      185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/contrib/admin/options.py"
    in wrapper
      544.                 return self.admin_site.admin_view(view)(*args, **kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/utils/decorators.py"
    in _wrapped_view
      149.                     response = view_func(request, *args, **kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/views/decorators/cache.py"
    in _wrapped_view_func
      57.         response = view_func(request, *args, **kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/contrib/admin/sites.py"
    in inner
      211.             return view(request, *args, **kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/contrib/admin/options.py"
    in add_view
      1509.         return self.changeform_view(request, None, form_url, extra_context)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/utils/decorators.py"
    in _wrapper
      67.             return bound_func(*args, **kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/utils/decorators.py"
    in _wrapped_view
      149.                     response = view_func(request, *args, **kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/utils/decorators.py"
    in bound_func
      63.                 return func.<strong>get</strong>(self, type(self))(*args2, **kwargs2)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/utils/decorators.py"
    in inner
      185.                     return func(*args, **kwargs)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/contrib/admin/options.py"
    in changeform_view
      1453.                     self.log_addition(request, new_object, change_message)</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/contrib/admin/options.py"
    in log_addition
      719.             object_repr=force_text(object),</p>
    
    <p>File
    "/home/kartheek/Applications/anaconda2/lib/python2.7/site-packages/django/utils/encoding.py"
    in force_text
      78.                 s = six.text_type(s)</p>
    
    <p>Exception Type: TypeError at /admin/movieaware/cover/add/ Exception
    Value: coercing to Unicode: need string or buffer, long found</p>
  </blockquote>
  
  <p>I have tried most of the solutions suggested but nothing is working.
  I was not able to figure out the problem</p>