title: Django models not accessible in python script
body: <p><strong>Directory structure</strong></p>
  <pre><code>my_project/
  ├ 
  ├ dashboard/
  ├ __init__.py
  │ ├ models.py
  │ └ module2.py
  scripts/
  ├ __init__.py
  │ ├ data_transfer.py
  │ └ 
  </code></pre>
  <p><strong>data_transfer.py</strong></p>
  <pre><code>import sys
  import os
  import django
  import ast
  from django.core.wsgi import get_wsgi_application
  
  os.environ.setdefault(&quot;DJANGO_SETTINGS_MODULE&quot;, &quot;my_project.settings&quot;)
  
  from dashboard.models import ReceivedData
  
  
  
  # dictionary = ast.literal_eval(str_dict)
  meter_data = ReceivedData.objects.all().first()
  print(meter_data.retrieved_data)
  print(meter_data)
  </code></pre>
  <p>I am trying to execute a python script inside Django project but somehow i am not able to access the models which are in other directory</p>
  <p><strong>error:</strong></p>
  <pre><code>&quot;data_transfer.py&quot;, line 10, in &lt;module&gt;
      from dashboard.models import ReceivedData
  ModuleNotFoundError: No module named 'dashboard'
  </code></pre>