Fakultas Ilmu Komputer UI

Commit ffb00fb2 authored by Rani Lasma Uli's avatar Rani Lasma Uli
Browse files

done testinggoat ch 18

parent 2fb56068
Pipeline #25744 failed with stages
in 44 minutes and 11 seconds
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-11-21 16:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email', models.EmailField(max_length=254)),
],
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-11-21 16:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_user'),
]
operations = [
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(max_length=254, unique=True),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-11-21 16:13
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_auto_20191121_2311'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='id',
),
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(max_length=254, primary_key=True, serialize=False),
),
]
......@@ -3,10 +3,18 @@ from django.db import models
from django.contrib.auth.models import (
AbstractBaseUser, BaseUserManager, PermissionsMixin
)
import uuid
class User(models.Model):
email = models.EmailField(primary_key=True)
REQUIRED_FIELDS = []
USERNAME_FIELD = 'email'
is_anonymous = False
is_authenticated = True
class Token(models.Model):
email = models.EmailField()
uid = models.CharField(max_length=255)
uid = models.CharField(default=uuid.uuid4, max_length=40)
class ListUserManager(BaseUserManager):
......
......@@ -61,7 +61,7 @@ INSTALLED_APPS = [
'accounts',
]
AUTH_USER_MODEL = 'accounts.ListUser'
AUTH_USER_MODEL = 'accounts.User'
AUTHENTICATION_BACKENDS = [
'accounts.authentication.PasswordlessAuthenticationBackend',
]
......
Supports Markdown
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