Created
April 8, 2016 21:41
-
-
Save ekalvi/9a94aa4f131a31653205ab09612e61e1 to your computer and use it in GitHub Desktop.
Slack channel invites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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