roo roo roo down the river we go...
This commit is contained in:
15
users/serializers.py
Normal file
15
users/serializers.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from rest_framework import serializers
|
||||
from django.contrib.auth.models import User
|
||||
from .models import User as CustomUser
|
||||
|
||||
|
||||
class UserSerializer(serializers.ModelSerializer):
|
||||
"""
|
||||
Serializer for the User model.
|
||||
"""
|
||||
class Meta:
|
||||
model = CustomUser
|
||||
fields = ('id', 'username', 'email', 'first_name', 'last_name', 'is_job_seeker',
|
||||
'is_employer', 'is_tenant_admin', 'is_global_admin', 'bio', 'phone_number',
|
||||
'company_name', 'created_at', 'updated_at')
|
||||
read_only_fields = ('id', 'created_at', 'updated_at')
|
||||
Reference in New Issue
Block a user