title: Getting TypeError: __init__() got an unexpected keyword argument 'upload_to' in Django Project?
body: <p>I have just started learning Django frame work and got stuck after getting an unexpected error as below:-(I have tried to post all information, which i find necessary to be here)</p>
  <pre><code>TypeError: __init__() got an unexpected keyword argument 'upload_to'
  </code></pre>
  <p>I got this error while running command  <code>python manage.py makemigrations</code>
  My project contains only one Model class <code>Products</code></p>
  <p><strong>My Model Class:-</strong></p>
  <pre><code>from django.db import models
  
  
  # Create your models here.
  class Products(models.Model):
      name = models.CharField(max_length=25)
      price = models.IntegerField()
      description = models.CharField(max_length=50)
      pic = models.DateTimeField(upload_to=&quot;myimages&quot;)
  </code></pre>
  <p>I am added my app in INSTALLED_APPS fields in setting.py</p>
  <p><a href="https://i.stack.imgur.com/p7vT5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p7vT5.png" alt="My Project My Structure." /></a></p>
  <p><strong>Full Error Track:-</strong></p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\manage.py&quot;, line 22, in &lt;module&gt;
      main()
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\manage.py&quot;, line 18, in main
      execute_from_command_line(sys.argv)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py&quot;, line 419, in execute_from_command_line
      utility.execute()
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py&quot;, line 395, in execute
      django.setup()
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\__init__.py&quot;, line 24, in setup
      apps.populate(settings.INSTALLED_APPS)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\registry.py&quot;, line 114, in populate
      app_config.import_models()
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\config.py&quot;, line 301, in import_models
      self.models_module = import_module(models_module_name)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1030, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1007, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 986, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 680, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 855, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 228, in _call_with_frames_removed
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\products\models.py&quot;, line 5, in &lt;module&gt;
      class Products(models.Model):
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\products\models.py&quot;, line 9, in Products
      pic = models.DateTimeField(upload_to=&quot;myimages&quot;)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\fields\__init__.py&quot;, line 1158, in __init__
      super().__init__(verbose_name, name, **kwargs)
  TypeError: __init__() got an unexpected keyword argument 'upload_to'
  
  C:\Users\Admin\PycharmProjects\ecommerceproject&gt;cls
  
  C:\Users\Admin\PycharmProjects\ecommerceproject&gt;python manage.py makemigrations
  Traceback (most recent call last):
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\manage.py&quot;, line 22, in &lt;module&gt;
      main()
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\manage.py&quot;, line 18, in main
      execute_from_command_line(sys.argv)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py&quot;, line 419, in execute_from_command_line
      utility.execute()
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py&quot;, line 395, in execute
      django.setup()
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\__init__.py&quot;, line 24, in setup
      apps.populate(settings.INSTALLED_APPS)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\registry.py&quot;, line 114, in populate
      app_config.import_models()
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\config.py&quot;, line 301, in import_models
      self.models_module = import_module(models_module_name)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1030, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1007, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 986, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 680, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 855, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 228, in _call_with_frames_removed
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\products\models.py&quot;, line 5, in &lt;module&gt;
      class Products(models.Model):
    File &quot;C:\Users\Admin\PycharmProjects\ecommerceproject\products\models.py&quot;, line 9, in Products
      pic = models.DateTimeField(upload_to=&quot;myimages&quot;)
    File &quot;C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\fields\__init__.py&quot;, line 1158, in __init__
      super().__init__(verbose_name, name, **kwargs)
  TypeError: __init__() got an unexpected keyword argument 'upload_to'
  </code></pre>
  <p>Thanks in advance.
  Hope to here from you soon.</p>