tgs / django-badgekit-webhooks

Django Webhooks for Mozilla's BadgeKit API
MIT License
5 stars 2 forks source link

How to put info into templates #6

Open tgs opened 10 years ago

tgs commented 10 years ago

Hey @ottonomy,

Take a look at the info I've put into the context of the HTML e-mail.

Should we do it this way, or should we just pass the BadgeKit-API response objects ('badge' and 'claimCode') straight to the template? Then in the template instead of:

<h1>{{ organization }}</h1>

You would have

<h1>{{ badge.issuer.name }}</h1>

Those dots are just dictionary lookups, not web or database calls or anything. I think I like this because you can use more info from the api without having to change it in two places. But of course it is putting more logic in the template.

ottonomy commented 10 years ago

:thumbsup: @tgs