Made date_created serialize to 12 hour time format

This commit is contained in:
keannu125 2023-03-04 17:18:11 +08:00
parent 428423c2cc
commit df411d2f46
2 changed files with 1 additions and 0 deletions

Binary file not shown.

View file

@ -4,6 +4,7 @@ from .models import Note
class NoteSerializer(serializers.HyperlinkedModelSerializer):
owner = serializers.ReadOnlyField(source='owner.username')
date_created = serializers.DateTimeField(format="%d-%m-%Y %I:%M%p")
class Meta:
model = Note