Skip to content

Commit

Permalink
Create contrib folder with initial contents.
Browse files Browse the repository at this point in the history
  • Loading branch information
dokterbob committed Feb 4, 2016
1 parent 0e7f22c commit 76cec08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contrib/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Assorted contributions
======================

Various contributions which are not part of the official Python package but
might be useful to other users nonetheless.
13 changes: 13 additions & 0 deletions contrib/export_subscribers.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Export a list of currently active subscribers and subscription dates
-- Tested to work with MySQL
SELECT
IFNULL(newsletter_subscription.name, CONCAT_WS(' ', auth_user.first_name, auth_user.last_name)) AS name,
IFNULL(newsletter_subscription.email, auth_user.email) AS email,
subscribe_date
FROM newsletter_subscription
LEFT JOIN auth_user
ON newsletter_subscription.user_id = auth_user.id
WHERE
subscribed = 1 AND
unsubscribed = 0

0 comments on commit 76cec08

Please sign in to comment.