Commit 6d425c3d by John Jarvis

adding find_ungenerated (first commit)

parent 2be4f6a2
import sys
from django.core.management.base import BaseCommand, CommandError
from certificates.models import GeneratedCertificate
import simplejson
class Command(BaseCommand):
def handle(self, *args, **options):
l = GeneratedCertificate.objects.filter( download_url = None ).values()
sl = [{'user_id':x['user_id'], 'name':x['name']} for x in l]
sys.stdout.write(simplejson.dumps(sl))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment