regluit/core/management/commands/dump_emails.py

20 lines
417 B
Python
Raw Normal View History

2012-08-03 15:16:47 +00:00
"""
print user emails
"""
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
2013-06-03 16:31:39 +00:00
2012-08-03 15:16:47 +00:00
from regluit.core import models
class Command(BaseCommand):
help = "dump all ungluer emails"
def handle(self, **options):
num=0
for user in User.objects.all():
print user.email
num=num+1
print "Number of emails= %s" % num