# Path: pytask/profile/models.py
# class Profile(models.Model):
#     full_name = models.CharField(
#       max_length=50, verbose_name="Name as on bank account",
#       help_text="Any DD/Cheque will be issued on this name")
# 
#     user = models.ForeignKey(User, unique = True)
# 
#     role = models.CharField(max_length=255,
#                             choices=ROLES_CHOICES,
#                             default=u"Contributor")
# 
#     pynts = models.PositiveSmallIntegerField(default=0)
# 
#     aboutme = models.TextField(
#       blank = True,
#       help_text="This information will be used to judge the eligibility "
#         "for any task")
# 
#     dob = models.DateField(verbose_name=u"Date of Birth",
#                            help_text="YYYY-MM-DD")
# 
#     gender = models.CharField(verbose_name=u'Gender',
#                               max_length=24, choices=GENDER_CHOICES)
# 
#     address = models.TextField(
#       blank=False, help_text="This information will be used to send "
#         "any DDs/Cheques.")
# 
#     phonenum = models.CharField(max_length = 15, blank = True,
#                                 verbose_name = u"Phone Number")
# 
#     def __unicode__(self):
#         return unicode(self.user.username)
# 
# class Notification(models.Model):
#     """ A model to hold notifications.
#     All these are sent by the site to users.
#     Hence there is no sent_from option.
#     """
# 
#     sent_to = models.ForeignKey(User,
#                                 related_name = "%(class)s_sent_to",
#                                 blank = False)
# 
#     subject = models.CharField(max_length=100, blank=True)
# 
#     message = models.TextField()
# 
#     sent_date = models.DateTimeField()
# 
#     is_read = models.BooleanField(default = False)
# 
#     is_deleted = models.BooleanField(default = False)


import sys
from datetime import datetime
from django.core.management.base import NoArgsCommand
from django.contrib.auth.models import User
from pytask.profile.models import Profile, Notification
from pytask.utils import make_key
        address = "I live in street"+str(i)
        phonenum = "1234567890"

        new_user = User.objects.create_user(username=username,
                                            email=email,
                                            password=password)

        new_profile = Profile()
        new_profile.user = new_user
        new_profile.full_name = full_name
        new_profile.dob = dob
        new_profile.aboutme = aboutme
        new_profile.gender = gender
        new_profile.address = address
        new_profile.phonenum = phonenum
        if i%2 == 0:
            new_profile.rights = "CT"
        elif i%3 == 0:
            new_profile.rights = "CR"
        new_profile.save()

    new_user.is_superuser = True
    new_user.is_staff = True
    new_user.save()

    for i in range(10):
        Notification(sent_to=new_user, sent_date=datetime.now(), 
                     subject="A subject here for"+str(i),
                     message="A message with mess"+str(i)+" html inside.\
                     <br /><b>a bold text</b>",

# Path: pytask/profile/models.py
# class Profile(models.Model):
#     full_name = models.CharField(
#       max_length=50, verbose_name="Name as on bank account",
#       help_text="Any DD/Cheque will be issued on this name")
# 
#     user = models.ForeignKey(User, unique = True)
# 
#     role = models.CharField(max_length=255,
#                             choices=ROLES_CHOICES,
#                             default=u"Contributor")
# 
#     pynts = models.PositiveSmallIntegerField(default=0)
# 
#     aboutme = models.TextField(
#       blank = True,
#       help_text="This information will be used to judge the eligibility "
#         "for any task")
# 
#     dob = models.DateField(verbose_name=u"Date of Birth",
#                            help_text="YYYY-MM-DD")
# 
#     gender = models.CharField(verbose_name=u'Gender',
#                               max_length=24, choices=GENDER_CHOICES)
# 
#     address = models.TextField(
#       blank=False, help_text="This information will be used to send "
#         "any DDs/Cheques.")
# 
#     phonenum = models.CharField(max_length = 15, blank = True,
#                                 verbose_name = u"Phone Number")
# 
#     def __unicode__(self):
#         return unicode(self.user.username)
# 
# class Notification(models.Model):
#     """ A model to hold notifications.
#     All these are sent by the site to users.
#     Hence there is no sent_from option.
#     """
# 
#     sent_to = models.ForeignKey(User,
#                                 related_name = "%(class)s_sent_to",
#                                 blank = False)
# 
#     subject = models.CharField(max_length=100, blank=True)
# 
#     message = models.TextField()
# 
#     sent_date = models.DateTimeField()
# 
#     is_read = models.BooleanField(default = False)
# 
#     is_deleted = models.BooleanField(default = False)


# Path: pytask/profile/management/commands/seed_db.py
import sys
from datetime import datetime
from django.core.management.base import NoArgsCommand
from django.contrib.auth.models import User
from pytask.profile.models import Profile, Notification
from pytask.utils import make_key

        address = "I live in street"+str(i)
        phonenum = "1234567890"

        new_user = User.objects.create_user(username=username,
                                            email=email,
                                            password=password)

        new_profile = Profile()
        new_profile.user = new_user
        new_profile.full_name = full_name
        new_profile.dob = dob
        new_profile.aboutme = aboutme
        new_profile.gender = gender
        new_profile.address = address
        new_profile.phonenum = phonenum
        if i%2 == 0:
            new_profile.rights = "CT"
        elif i%3 == 0:
            new_profile.rights = "CR"
        new_profile.save()

    new_user.is_superuser = True
    new_user.is_staff = True
    new_user.save()

    for i in range(10):
        Notification(sent_to=new_user, sent_date=datetime.now(), 
                     subject="A subject here for"+str(i),
                     message="A message with mess"+str(i)+" html inside.\
                     <br /><b>a bold text</b>",

                     uniq_key=make_key(Notification),