aboutsummaryrefslogtreecommitdiff
path: root/src/django_pgpmailman
diff options
context:
space:
mode:
Diffstat (limited to 'src/django_pgpmailman')
-rw-r--r--src/django_pgpmailman/forms.py3
-rw-r--r--src/django_pgpmailman/views/list.py7
-rw-r--r--src/django_pgpmailman/views/user.py12
3 files changed, 6 insertions, 16 deletions
diff --git a/src/django_pgpmailman/forms.py b/src/django_pgpmailman/forms.py
index 3083274..18d75de 100644
--- a/src/django_pgpmailman/forms.py
+++ b/src/django_pgpmailman/forms.py
@@ -227,7 +227,8 @@ class ListCreateForm(forms.Form):
required=False)
list_style = forms.ChoiceField()
- def __init__(self, domain_choices=None, style_choices=None, *args, **kwargs):
+ def __init__(self, domain_choices=None, style_choices=None,
+ *args, **kwargs):
super(ListCreateForm, self).__init__(*args, **kwargs)
self.fields['mail_host'] = forms.ChoiceField(
widget=forms.Select(),
diff --git a/src/django_pgpmailman/views/list.py b/src/django_pgpmailman/views/list.py
index f2289b2..4f6d8db 100644
--- a/src/django_pgpmailman/views/list.py
+++ b/src/django_pgpmailman/views/list.py
@@ -111,9 +111,10 @@ class ListKey(View):
raise Http404
key_file = ContentFile(str(key))
response = HttpResponse(key_file, 'application/pgp-keys')
- response['Content-Length'] = key_file.size
- response[
- 'Content-Disposition'] = 'attachment; filename="%s.asc"' % self.pgp_list.list_id
+ length = key_file.size
+ disposition = 'attachment; filename="%s.asc"' % self.pgp_list.list_id
+ response['Content-Length'] = length
+ response['Content-Disposition'] = disposition
return response
diff --git a/src/django_pgpmailman/views/user.py b/src/django_pgpmailman/views/user.py
index cc1dbc3..afb9b4c 100644
--- a/src/django_pgpmailman/views/user.py
+++ b/src/django_pgpmailman/views/user.py
@@ -42,15 +42,3 @@ class UserSummaryView(TemplateView):
pass
data['addresses'] = addresses
return data
-
-#
-# class UserSummaryView(FormView):
-# template_name = 'django_pgpmailman/user/summary.html'
-#
-# @method_decorator(login_required)
-# @user_class_view
-# def dispatch(self, request, *args, **kwargs):
-# return super(UserSummaryView, self).dispatch(request, *args, **kwargs)
-#
-# def get_form_class(self):
-# return formset_factory(AddressForm, )