performance optimizations for hosting package detail view

- prefetch database objects in CustomerHostingPackageDetails.get_context_data
- use prefetched data in template hostingpackage/customerhostingpackage_detail.html
- mention optimization in changelog
This commit is contained in:
Jan Dittberner 2015-01-26 12:00:26 +01:00
parent 638a6f6712
commit f3168ffdb7
3 changed files with 19 additions and 12 deletions

View file

@ -114,6 +114,12 @@ class CustomerHostingPackageDetails(StaffOrSelfLoginRequiredMixin, DetailView):
context.update({
'customer': self.get_customer_object(),
'uploadserver': settings.OSUSER_UPLOAD_SERVER,
'databases': context['hostingpackage'].databases,
'osuser': context['hostingpackage'].osuser,
'hostingoptions':
context['hostingpackage'].get_hostingoptions(),
'domains': context['hostingpackage'].domains.all(),
'mailboxes': context['hostingpackage'].mailboxes,
})
return context