title: The distribution Django project runs different with the local project, get 1366, "Incorrect string value Error
body: <p>The distribution Django project runs different with the local project.
  I have a Django project, in it there is a create APIView, in my local repo, it works fine, but when I push the repo to the remote, then run it with </p>
  
  <p><code>screen -d -m python3 -m Qy.wsgi</code></p>
  
  <p>and if I access the create url, there comes the <code>500 Server Error</code> error.</p>
  
  <p>but in my local repo, it works fine.</p>
  
  <p>related code are bellow:</p>
  
  <p>model:</p>
  
  <pre><code>class Currency(models.Model):
  
      name = models.CharField(max_length=16)
      desc = models.CharField(max_length=128, null=True, blank=True)
      standard_symbol = models.CharField(max_length=8)
      ex_rate = models.DecimalField(decimal_places=4, default=0.0000, max_digits=10)
  
      class Meta:
          ordering = ['-standard_symbol']
  
      def __str__(self):
          return self.name
      def __unicode__(self):
          return self.name
  </code></pre>
  
  <p>apiview:</p>
  
  <pre><code>class CurrencyCreateAPIView(CreateAPIView):
  
      serializer_class = CurrencySerializer
      permission_classes = [IsSuperAdminOrFinanceAdmin]
      queryset = Currency.objects.all()
  </code></pre>
  
  <p>serializer:</p>
  
  <pre><code> class CurrencySerializer(ModelSerializer):
  
      class Meta:
          model = Currency
          fields = "__all__"
  </code></pre>
  
  <p>I just don't know why in the distribution it can not create with Chinese characters.</p>
  
  <p>I means if I write in all number, such as: </p>
  
  <p><code>name: 123, desc: 123, standard_symbol: 123, ex_rate:1233</code></p>
  
  <p>it will create success.</p>
  
  <p>or if there is English Characters it will works too, but if there is Chinese Character it will report the <code>500 Server Error</code>. I use MySQL as database.</p>
  
  <p>but in the local repo it will works if it contains Chinese Characters.</p>
  
  <p>the remote repo code is as same as the local repo.</p>
  
  <p>My local repo operation system: <code>MacOS</code><br>
  My remote repo operation system: <code>CentOS7.2</code> </p>
  
  <hr>
  
  <p><strong>EDIT-1</strong> </p>
  
  <p>My settings of <code>wsgi.py</code> is bellow:</p>
  
  <pre><code>import os
  
  from django.core.wsgi import get_wsgi_application
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "qy.settings")
  
  import django
  
  print("django.setup()")
  django.setup()
  
  from socketio import Middleware
  from qysio.views import sio
  
  django_app = get_wsgi_application()
  application = Middleware(sio, django_app)
  
  
  
  import eventlet
  import eventlet.wsgi
  eventlet.wsgi.server(eventlet.listen(('', 8000)), application)  
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT-2</strong></p>
  
  <p>I set the <code>DEBUG=True</code> in settings.py, and I get the bellow error when edit(the same as use create ):</p>
  
  <pre><code>OperationalError at /api/productconfig/price_system/currency/1/edit/
  (1366, "Incorrect string value: '\\xE4\\xBA\\xBA\\xE6\\xB0\\x91...' for column 'name' at row 1")
  </code></pre>