私はDjangoを初めて使用し、最初の優れたアプリを作成しようとしています。複雑さの低いWebサイトを再構築することにし、http://trailertrack.me/を選択しました。
どの手順を踏むべきか教えていただけませんか。
現在、私のviews.pyファイルは次のようになっています(現時点では特定のビデオを1つだけ表示しようとしています)。
from django.http import HttpResponse
from django.shortcuts import render_to_response
import gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
def index(request):
message = "Welcome, and enjoy the show!"
context = {
'message': message,
}
return render_to_response('index.html', context)
def video(request):
t = loader.get_template('index.html')
specificentry = yt_service.GetYouTubeVideoEntry(video_id='1g4PLj0PlOM')
return HttpResponse(t.render(specificentry))
アドバイスありがとうございます!