mirror of
https://github.com/lemeow125/Django-NotesApp.git
synced 2024-11-17 06:29:25 +08:00
Made date_created serialize to 12 hour time format
This commit is contained in:
parent
428423c2cc
commit
df411d2f46
2 changed files with 1 additions and 0 deletions
Binary file not shown.
|
@ -4,6 +4,7 @@ from .models import Note
|
||||||
|
|
||||||
class NoteSerializer(serializers.HyperlinkedModelSerializer):
|
class NoteSerializer(serializers.HyperlinkedModelSerializer):
|
||||||
owner = serializers.ReadOnlyField(source='owner.username')
|
owner = serializers.ReadOnlyField(source='owner.username')
|
||||||
|
date_created = serializers.DateTimeField(format="%d-%m-%Y %I:%M%p")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Note
|
model = Note
|
||||||
|
|
Loading…
Reference in a new issue