[Answer]-Access related database field Django template

1👍

It would be a simple

{{tweet.twitteraccount.icon_url}}

which would show on the template if present.

To display the icon on the template:

<img src="{{tweet.twitteraccount.icon_url}}" alt="Some alt text" />

Documentation on this can be found here

Leave a comment