django 정적 이미지 업로드 질문드립니다
제가 venvs/mysite/pybo/templates 안의 hello.html 파일 안에 {%load static}
하고 venvs/mysite/pybo/static/image 이 폴더에 있는 이미지 를 불러오기 하려고
<img src={%static '/django.jpg' %}> 이걸 하는데
계속 이미지는 안뜨고 css 파일만 뜨네요 ㅠㅠㅠ
django.jpg는 이미지이름입니다
config 파일 내에 settings 안에서도
STATIC_URL = "/static/"
STATICFILES_DIRS = [
os.path.join(BASE_DIR,"pybo/static")
]
이것도 했는데 안되네요 ㅠㅠㅠㅠ
pybo/view.py 파일 안에도
from django.shortcuts import render,get_object_or_404,redirect
from django.http import HttpResponse
from .models import Question,Answer
def hello(request):
#return HttpResponse('pybo/hello.html')
return render(request,'pybo/hello.html')
뭐가 문제인걸까요 ...
파이썬 migrate랑 runserver도 다 새로고침 했습니다..