Fixed #16096 - Add origin attribute to template instances.

Adding a pull request for this ticket:

https://code.djangoproject.com/ticket/16096