def get_absolute_url(self):
return "/uploads/%i" % self.id
It’s not what I want but
This is far as I can think of. I need a link for my files (like…/photo.jpg)
I just learned how to get feeds from my django website.
And I want this jpeg’s absolute url.
http://myDjangoWeb/uploads/goodies_89087_1211864024_1.jpeg
How can I get this file’s absolute url…..self.?????
Just use
.urlproperty of the file field.See “Managing files” in Django documentation.