- form = contact_forms[request.GET['form_tag']]
- context['extract_types'] = [dict(slug = 'all', label = _('all'))] + [dict(slug = 'contacts', label = _('contacts'))]
+ form = contact_forms.get(request.GET['form_tag'])
+ context['extract_types'] = [
+ {'slug': 'all', 'label': _('all')},
+ {'slug': 'contacts', 'label': _('contacts')}]