Fakultas Ilmu Komputer UI

Commit 3cf7f9a0 authored by Kefas Satrio Bangkit Solideantyo's avatar Kefas Satrio Bangkit Solideantyo
Browse files

[GREEN] add name to user model

parent 66348f93
Pipeline #71882 failed with stage
in 7 minutes and 5 seconds
# Generated by Django 3.1 on 2021-04-24 06:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authentication', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='customuser',
name='name',
field=models.CharField(default='tes', max_length=100),
preserve_default=False,
),
]
......@@ -8,6 +8,7 @@ from dietela_quiz.models import DietProfile
from .managers import CustomUserManager
class CustomUser(AbstractBaseUser, PermissionsMixin):
name = models.CharField(max_length=100)
email = models.EmailField(_('email address'), unique=True)
is_staff = models.BooleanField(default=False)
is_active = models.BooleanField(default=True)
......
......@@ -6,5 +6,5 @@ class CustomUserDetailsSerializer(serializers.ModelSerializer):
class Meta:
model = CustomUser
fields = ('id', 'email',)
fields = ('id', 'name', 'email',)
read_only_fields = ('id', 'email',)
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