How can I connect to an external database to get data and display in the template? Examples would be much appreciated.