If I have a .mp4 file, it will automatically 开发者_运维百科display a video (flash?) If it's a jpg, it'll just display the image...
Edit: I want this embedded inside a webpage.
As eternicode says, all you need to do is make your views the normal way and pass the querysets to your template.
In the template , all you need to do is load the content from your query as part of /media
as defined in your settings.py
e.g
<img src="/media/{{model.object}}" width="135" height="60" alt="thumbnail" />
no, you must have file view generator,
thats mean you have list of pic and video and then for each file generate correct player and tag
its easy
You need specify the "Content-Type" in the http response header.
精彩评论