aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ08nY2017-08-22 13:52:57 +0200
committerJ08nY2017-08-22 13:52:57 +0200
commitbe2e0df0ddfc174e99cf47a5180ffc1e3661b289 (patch)
tree9fa318b78b93e0ff9bc6fb3ae406672ace31992c /src
parent0256be0d39c24c6bec456e320634a93b3f1f282b (diff)
downloaddjango-pgpmailman-be2e0df0ddfc174e99cf47a5180ffc1e3661b289.tar.gz
django-pgpmailman-be2e0df0ddfc174e99cf47a5180ffc1e3661b289.tar.zst
django-pgpmailman-be2e0df0ddfc174e99cf47a5180ffc1e3661b289.zip
Diffstat (limited to 'src')
-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, )