Mohammad Siavashi
Mohammad Siavashi

Reputation: 1262

how to display uploaded image with FileField in django template

I'm currently learning django , I'm trying to create a simple upload site. I figured out I should use django FileField for this purpose but I want to know how to display the images uploaded using this field on the index page using django template . I know I can use the ImageField in my case but I'm trying to know if it is possible with FileField ?

Upvotes: 0

Views: 1978

Answers (1)

Daniel Petrikin
Daniel Petrikin

Reputation: 198

<img src="{{fileobj.url}}"/>

Upvotes: 5

Related Questions