I have a dictionary containing profile information which i am using to show profile details in django template. Now i want to display a default message in case a particular information is not available.
I know i can use default filter to accomplish this. But all my default messages are stored as another dictionary. so i want something like this –
<span>{{ profile.about|default:"{{ defaults.about }}" }}</span>
I am not able to achieve desired results using above syntax.
Any help on correct way will be really appreciated.
1 Answer