<commit_before>from django.core.management.base import LabelCommand, CommandError
from corehq.apps.domain.shortcuts import create_domain, create_user
from corehq.apps.users.models import CouchUser

class Command(LabelCommand):
    help = "Bootstrap a domain and user who owns it."
    args = "<domain> <user> <pass>"
    label = ""
     
    def handle(self, *args, **options):
        if len(args) != 3:
            raise CommandError('Usage: manage.py bootstrap <domain> <user> <password>')
        domain_name, username, passwd = args
        domain = create_domain(domain_name)
        user = create_user(username, passwd)
        couch_user = CouchUser.from_django_user(user)
        couch_user.add_domain_membership(domain_name, is_admin=True)
        couch_user.save()
        
        print "user %s created and added to domain %s" % (user, domain)<commit_msg>updated bootstrap command<commit_after>from django.core.management.base import LabelCommand, CommandError
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.users.models import WebUser

class Command(LabelCommand):
    help = "Bootstrap a domain and user who owns it."
    args = "<domain> <email> <password>"
    label = ""
     
    def handle(self, *args, **options):
        if len(args) != 3:
            raise CommandError('Usage: manage.py bootstrap <domain> <email> <password>')
        domain_name, username, passwd = args
        domain = create_domain(domain_name)
        couch_user = WebUser.create(domain_name, username, passwd)
        couch_user.add_domain_membership(domain_name, is_admin=True)
        couch_user.save()
        
        print "user %s created and added to domain %s" % (couch_user.username, domain)
{'fraction_non_alphanumeric': 0.10104529616724739, 'fraction_numerical': 0.0011614401858304297, 'mean_word_length': 3.3842239185750635, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7243798', 'n_tokens_mistral': 507, 'n_tokens_neox': 504, 'n_words': 137}