Django spotify api 정보 js를 이용해서 프론트로 옮기기
views.py에서 백엔드 로직을 다 작성했다면
1. views.py에 TemplateView로 렌더링 할 뷰를 적어준다.
PlaylistPageView는 템플릿을 렌더링 하는 역할로 해당 뷰가 호출될 때 playlist.html 템플릿을 렌더링 한다.
class PlaylistPageView(TemplateView):
template_name = "playlist/playlist.html"
2. html의 head 태그에 라이브러리 ...
yeonnan.hashnode.dev1 min read