Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ARN
coin
Commits
50253ecb
Commit
50253ecb
authored
Aug 23, 2019
by
jocelyn
Browse files
TEST
parent
a642cd6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
maillists/views.py
View file @
50253ecb
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
import
logging
from
django.contrib
import
messages
from
django.contrib.auth.decorators
import
login_required
...
...
@@ -10,6 +11,7 @@ from django.shortcuts import render, redirect
from
.models
import
MaillingList
,
MaillingListSubscription
,
SyncCommandError
from
coin.members.models
import
Member
logger
=
logging
.
getLogger
(
__name__
)
class
SubscriptionForm
(
forms
.
Form
):
subscribed
=
forms
.
BooleanField
(
widget
=
forms
.
Select
(
choices
=
(
...
...
@@ -58,6 +60,7 @@ def lists_list(request):
to_remove
=
old_subscriptions
-
new_subscriptions
MaillingListSubscription
.
objects
.
filter
(
member
=
request
.
user
,
maillinglist__in
=
to_remove
).
delete
()
except
SyncCommandError
as
e
:
logger
.
error
(
e
)
messages
.
error
(
request
,
"Impossible de sauvegarder tes abonnements. "
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment