1
내 모델에 대한 일부 가짜 데이터를 생성이 스크립트를 실행하려고하지만 가져 오기 오류로 실행하고는 :가져 오기 오류가
Project Folder/
apps/
photos/
__init__.py
models.py
...
utils/
__init__.py
fake_data.py
...
__init__.py
manage.py
settings.py
urls.py
...
:
ImportError: No module named apps.photos.models
이 내 프로젝트 설정입니다
이들은 fake_data.py
내가 임은 사진 모델을 가져올 수없는 이유를 잘 모릅니다import os, sys
script_path = os.path.abspath(__file__)
sys.path.append(script_path)
import random
from loremipsum.generator import *
from apps.photos.models import Photo
내 수입이다. 파이썬 경로에 파일을 올바르게 추가하고 있습니까? 미리 감사드립니다.