Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Django management command #96

wants to merge 2 commits into from

2 participants


I have added a django management command for submitting submissions. Maybe this helps with issue #39


Hey @viaregio, in principle: yes, this helps a great deal. However, it would make more sense to refactor all of this in one strike:

  1. Add management command (which you just did).
  2. Update legacy cronjob to call the new job, in order to maintain compatibility - in such as way that not having django-extensions installed won't break newsletter.
  3. Update the documentation to reflect the new functionality.

If you think you are up to this: great!
Otherwise, I'll implement this myself in a couple of months (and will be sure to include your patch as a start).

@dokterbob dokterbob modified the milestone: Future, 0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
2  newsletter/management/
@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+# management commands for the newsletter
2  newsletter/management/commands/
@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+# management commands for the newsletter
21 newsletter/management/commands/
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+actual sending of the submissions
+import logging
+from import BaseCommand
+from django.utils.translation import ugettext as _
+from newsletter.models import Submission
+class Command(BaseCommand):
+ help = "Submit pending messages."
+ args = ""
+ def handle(self, *args, **options):
+ self.logger = logging.getLogger(type(self).__name__)
+ self.logger.debug('Handle called')
+'Submitting queued newsletter mailings'))
+ Submission.submit_queue()
Something went wrong with that request. Please try again.