@@ -0,0 +1,2734 @@
+import re%0Afrom django.conf import settings%0Afrom django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager%0Afrom django.core import validators%0Afrom django.core.mail import send_mail%0Afrom django.db import models%0Afrom django.template.loader import render_to_string%0Afrom django.utils import timezone%0Afrom django.utils.translation import ugettext_lazy as _%0A%0A%0Aclass Hacker(AbstractBaseUser, PermissionsMixin):%0A    username = models.CharField(_('username'), max_length=30, unique=True,%0A        help_text=_('Required. 30 characters or fewer. Letters, numbers and '%0A                    '@/./+/-/_ characters'),%0A        validators=%5B%0A            validators.RegexValidator(re.compile('%5E%5B%5Cw.@+-%5D+$'), _('Enter a valid username.'), 'invalid')%0A        %5D)%0A    first_name = models.CharField(_('first name'), max_length=30, blank=True)%0A    last_name = models.CharField(_('last name'), max_length=30, blank=True)%0A%0A    email = models.EmailField(_('Email address'), max_length=254, unique=True)%0A    email_verified = models.BooleanField(_('Was email approved'), default=False)%0A%0A    is_staff = models.BooleanField(_('staff status'), default=False,%0A        help_text=_('Designates whether the user can log into this admin '%0A                    'site.'))%0A    is_active = models.BooleanField(_('active'), default=False,%0A        help_text=_('Designates whether this user should be treated as '%0A                    'active. Unselect this instead of deleting accounts.'))%0A    date_joined = models.DateTimeField(_('date joined'), default=timezone.now)%0A%0A    repository = models.URLField(_('Github or Bitbucket page.'))     # repository%0A    stackoverflow_user = models.URLField(_('Stackoverflow user.'))   # repository%0A    description = models.TextField()%0A%0A    objects = UserManager()%0A%0A    USERNAME_FIELD = 'username'%0A    REQUIRED_FIELDS = %5B'email'%5D%0A%0A    def get_full_name(self):%0A        %22%22%22%0A        Returns the first_name plus the last_name, with a space in between.%0A        %22%22%22%0A        full_name = '%25s %25s' %25 (self.first_name, self.last_name)%0A        return full_name.strip()%0A%0A    def get_short_name(self):%0A        %22Returns the short name for the user.%22%0A        return self.first_name%0A%0A    def activate(self, domain='demo.damis.lt'):%0A        if not self.is_active:%0A            self.is_active = True%0A            self.save()%0A            receiver = self.email%0A            subject = _('%7B0%7D account activated').format(domain)%0A            body = render_to_string('accounts/mail/account_activated.html', %7B%0A                'domain': domain,%0A                'username': self.username,%0A            %7D)%0A            sender = settings.DEFAULT_FROM_EMAIL%0A            send_mail(subject, body, sender, %5Breceiver%5D)%0A            return True%0A        return False%0A

Add CustomUser user model named Hacker.