def from_csv(self, user, row, expected_elements=5):
        if len(row) < expected_elements:
            raise BadRequest(_("Invalid line: %s" % row))
        address = row[1].strip()
        localpart, domname = split_mailbox(address)
        try:
            domain = Domain.objects.get(name=domname)
        except Domain.DoesNotExist:
            raise BadRequest(_("Domain '%s' does not exist" % domname))
        if not user.can_access(domain):
            raise PermDeniedException
        core_signals.can_create_object.send(
            sender="import", context=user, object_type="mailbox_aliases")
        core_signals.can_create_object.send(
            sender="import", context=domain, object_type="mailbox_aliases")
        if Alias.objects.filter(address=address).exists():
            raise Conflict
        self.address = address
        self.domain = domain
        self.enabled = (row[2].strip() in ["True", "1", "yes", "y"])
        self.save()
        self.set_recipients([raddress.strip() for raddress in row[3:]])
        self.post_create(user)
Can be overridden to deserialize data before returning it.
dataset/ETHPy150Open tonioo/modoboa/modoboa/admin/models/alias.py/Alias.from_csv--crossover with--dataset/ETHPy150Open blixt/py-starbound/starbound/btreedb4.py/FileBTreeDB4.deserialize_data