title: i set null = true and blank = true but still get "django.db.utils.IntegrityError: (1048, "Column 'massenger_name' cannot be null")"
body: <p>im trying to run my page but i get this error &quot;django.db.utils.IntegrityError: (1048, &quot;Column 'massenger_name' cannot be null&quot;)&quot;</p>
  <p>and i makemigrations and imgrate again but still i have same problem</p>
  <p>and my database is mysql</p>
  <p>this my models.py</p>
  <pre><code>from django.db import models
  # Create your models here.
  
  class Name(models.Model):
      massenger_name = models.CharField(max_length=255,null=True,blank=True)
      action_time = models.DateTimeField(auto_now_add=True)
  
      def __str__(self):
          return str(self.massenger_name)
  </code></pre>
  <p>and this my views.py</p>
  <pre><code>from django.shortcuts import render
  from .models import Name
  from django.shortcuts import redirect
  
  # Create your views here.
  def Home(request):
          name_input = request.POST.get('user_name')
          name_in_model = Name(massenger_name=name_input)
          name_in_model.save()
          return render(request , 'index.html')
  </code></pre>
  <p>and this my index.html</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot; dir=&quot;rtl&quot;&gt;
    &lt;head&gt;
      &lt;meta charset=&quot;utf-8&quot;&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot; integrity=&quot;sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor&quot; crossorigin=&quot;anonymous&quot;&gt;
      {% load static %}
      &lt;link rel=&quot;stylesheet&quot; href=&quot;{% static 'CSS/style.css' %}&quot;&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id=&quot;form&quot;&gt;
        &lt;form class=&quot;row&quot; method=&quot;POST&quot;&gt;
          {% csrf_token %}
            &lt;div class=&quot;&quot;&gt;
              &lt;input type=&quot;textarea&quot; class=&quot;form-control&quot; placeholder=&quot;أكتب أسمك (مثلا/أخوكم عبدالله العتيبي)&quot; id=&quot;text_name&quot; name=&quot;user_name&quot; required&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col-auto&quot;&gt;
              &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary mb-3&quot; id=&quot;button&quot;&gt;حمل الصورة&lt;/button&gt;
            &lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>and this my setting.py</p>
  <pre><code>&quot;&quot;&quot;
  Django settings for Eid_G project.
  
  Generated by 'django-admin startproject' using Django 3.2.5.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/3.2/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/3.2/ref/settings/
  &quot;&quot;&quot;
  
  from pathlib import Path
  import os
  
  # Build paths inside the project like this: BASE_DIR / 'subdir'.
  BASE_DIR = Path(__file__).resolve().parent.parent
  TEMPLATES_DIR = os.path.join(BASE_DIR,&quot;templates&quot;)
  STATIC_DIR = os.path.join(BASE_DIR,&quot;static&quot;)
  
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = ''
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = True
  
  ALLOWED_HOSTS = []
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'Eid_Post',
  ]
  
  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',
  ]
  
  ROOT_URLCONF = 'Eid_G.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [TEMPLATES_DIR,],
          'APP_DIRS': True,
          'OPTIONS': {
              'context_processors': [
                  'django.template.context_processors.debug',
                  'django.template.context_processors.request',
                  'django.contrib.auth.context_processors.auth',
                  'django.contrib.messages.context_processors.messages',
              ],
          },
      },
  ]
  
  WSGI_APPLICATION = 'Eid_G.wsgi.application'
  
  
  # Database
  # https://docs.djangoproject.com/en/3.2/ref/settings/#databases
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'django_p',
          'HOST': 'localhost',
          'PORT': '3306',
          'USER': 'root',
          'PASSWORD': '',
      }
  }
  
  
  # Password validation
  # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
  
  AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  
  # Internationalization
  # https://docs.djangoproject.com/en/3.2/topics/i18n/
  
  LANGUAGE_CODE = 'en-us'
  
  TIME_ZONE = 'UTC'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = True
  
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/3.2/howto/static-files/
  
  STATIC_URL = '/static/'
  STATICFILES_DIRS = [STATIC_DIR,]
  
  # Default primary key field type
  # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
  
  DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
  </code></pre>
  <p>and thank u so much</p>