title: How to resolve: TypeError: __init__() got an unexpected keyword argument 'max_Length' I've tried everything
body: <blockquote>
  <p>Here's another similar question that didn't worked for me even it's almost the same situation <a href="https://stackoverflow.com/questions/40701350/how-to-resolve-typeerror-init-got-an-unexpected-keyword-argument-max-le">How to resolve TypeError: __init__() got an unexpected keyword argument &#39;_MAX_LENGTH&#39; in Django</a></p>
  </blockquote>
  <pre><code>from django.db import models
  import string
  import random
  
  
  def generate_unique_code():
      lenght = 6
  
      while True:
          code = ''.join(random.choices(string.ascii_uppercase, k=lenght))
          if Room.objects.filter(code=code).count() == 0:
              break
  
      return code
  
  # Create your models here.
  
  class Room(models.Model):
      code = models.CharField(max_Length=8, default=&quot;&quot;, unique=True)
      host = models.CharField(max_Length=50, unique=True)
      guest_can_pause = models.BooleanField(null=False, default=False)
      votes_to_skip = models.IntegerField(null=False, default=1)
      created_at = models.DateTimeField(auto_now_add=True)
  
  </code></pre>