Skip to content

Instantly share code, notes, and snippets.

@ekalvi
Created April 8, 2016 21:41
Show Gist options
  • Save ekalvi/9a94aa4f131a31653205ab09612e61e1 to your computer and use it in GitHub Desktop.
Save ekalvi/9a94aa4f131a31653205ab09612e61e1 to your computer and use it in GitHub Desktop.
Slack channel invites
from locl.models.user import LoclUser
min_id = 2533
max_id = 3000
tranche = 1
limit = 20
start = tranche * limit
end = start + limit
params = {
'beta_invite': True,
'email_verified': True,
'pk__gte': min_id,
'pk__lte': max_id
}
users = LoclUser.objects.filter(**params).order_by('-pk')[start:end]
print ", ".join([user.user.email for user in users])
cd /home/ubuntu/web/locl
. /home/ubuntu/env/locl/bin/activate
./manage.py shell --settings=locl.production_settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment