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
radiopanik
django-panik-newsletter
Commits
82cb8e79
Commit
82cb8e79
authored
Jan 04, 2020
by
fred
Browse files
commands: use print as a function
parent
2a8c358d
Changes
2
Hide whitespace changes
Inline
Side-by-side
newsletter/management/commands/load-from-spip-liste.py
View file @
82cb8e79
...
...
@@ -35,7 +35,7 @@ class Command(BaseCommand):
with
open
(
filename
)
as
fd
:
if
self
.
verbose
:
print
'Reading SPIP dump file'
print
(
'Reading SPIP dump file'
)
content
=
fd
.
read
()
# the spip_courriers parts of the spip export are not properly
# encoded, we manually remove them here so the XML file can be
...
...
@@ -47,7 +47,7 @@ class Command(BaseCommand):
self
.
load_authors
()
if
self
.
verbose
:
print
'Creating subscribers'
print
(
'Creating subscribers'
)
for
author_xml
in
self
.
root
.
iter
(
'spip_auteurs_elargis'
):
if
author_xml
.
find
(
'spip_listes_format'
).
text
not
in
(
'texte'
,
'html'
):
continue
...
...
newsletter/management/commands/update_newsletter_subscribers.py
View file @
82cb8e79
...
...
@@ -12,5 +12,5 @@ class Command(BaseCommand):
for
subscriber
in
Subscriber
.
objects
.
filter
(
is_validated
=
True
).
exclude
(
is_registered
=
True
):
if
self
.
verbose
:
print
'subscribing'
,
subscriber
.
email
print
(
'subscribing'
,
subscriber
.
email
)
subscriber
.
subscribe_in_mailman
()
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