I am new to Django and want to create dummy data so using faker library with sqlite db. Created models.py and DummyData.py .
models.py
from django.db import models # Create your models here. class User(models.Model): name = models.CharField(max_length=200) surname = models.CharField(max_length=200) email = models.EmailField(max_length=200, unique= True) def __str__(self): return "Object created " + "Name :-" + self.name + " Surname :-" + self.surname + " Email :-" + self.email for creating fake data made DummyData.py
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", 'Course.settings') # 1. method from .models import User # 2. method from appTwo.models import User Both ways I am not able to import Users class from models getting error like
Method 1 output ModuleNotFoundError: No module named '__main__.models'; '__main__' is not a package Method 2 output ModuleNotFoundError: No module named 'appTwo created empty init.py in appTwo folder. File structure is as above 
But I can able to import models.py using method 2 in Terminal, So I am little bit confuse.
