title: Getting Check that 'apps.ChatbotConfig.name' is correct. after restructuring
body: <p>I changed my project's structure by adding everything in a <code>src</code> folder, but my server stopped working.</p>
  
  <p>The error that I'm getting is :</p>
  
  <blockquote>
    <p>Cannot import 'chatbot'. Check that 'apps.ChatbotConfig.name' is
    correct</p>
  </blockquote>
  
  <p>I've tried to look for an answer, and most of the them suggest to change <code>apps.py</code> to <code>name = 'src.chatbot'</code>, but that didn't work for me. Tried to change the <code>apps.ChatbotConfig.name</code> but if I change anything, it says <code>no Module named 'chatbot'</code>.</p>
  
  <p>Here is my structure.</p>
  
  <p><a href="https://i.stack.imgur.com/D2X66.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D2X66.png" alt="[project structure"></a></p>
  
  <p>base.py</p>
  
  <pre><code>DJANGO_APPS = [
      "apps.ChatbotConfig",
      "django.contrib.auth",
      "django.contrib.contenttypes",
      "django.contrib.sessions",
      "django.contrib.sites",
      "django.contrib.messages",
      # "django.contrib.humanize", # Handy template tags
      "django.contrib.admin",
      "debug_toolbar",
      'django.contrib.staticfiles',
  
  ]
  </code></pre>
  
  <h3> apps.py </h3>
  
  <pre><code>from django.apps import AppConfig
  
  
  class ChatbotConfig(AppConfig):
      name = 'chatbot'
  </code></pre>
  
  <h3> admin.py </h3>
  
  <pre><code>from django.contrib import admin
  from django.apps import apps
  
  app = apps.get_app_config('chatbot')
  
  for model_name, model in app.models.items():
      admin.site.register(model)
  </code></pre>
  
  <h3> Full traceback </h3>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\lbajarunas\virtualenv\lib\site-packages\django\apps\config.py", line 143, in create
      app_module = import_module(app_name)
    File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\importlib\__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 1006, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 983, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 965, in _find_and_load_unlocked
  ModuleNotFoundError: No module named 'chatbot'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "manage.py", line 30, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "C:\Users\lbajarunas\virtualenv\lib\site-packages\django\core\management\__init__.py", line 371, in execute_from_command_line
      utility.execute()
    File "C:\Users\lbajarunas\virtualenv\lib\site-packages\django\core\management\__init__.py", line 347, in execute
      django.setup()
    File "C:\Users\lbajarunas\virtualenv\lib\site-packages\django\__init__.py", line 24, in setup
      apps.populate(settings.INSTALLED_APPS)
    File "C:\Users\lbajarunas\virtualenv\lib\site-packages\django\apps\registry.py", line 89, in populate
      app_config = AppConfig.create(entry)
    File "C:\Users\lbajarunas\virtualenv\lib\site-packages\django\apps\config.py", line 147, in create
      app_name, mod_path, cls_name,
  django.core.exceptions.ImproperlyConfigured: Cannot import 'chatbot'. Check that 'apps.ChatbotConfig.name' is correct.
  </code></pre>