mirror of
https://github.com/lemeow125/Ivy-Backend.git
synced 2024-11-17 06:39:26 +08:00
Revised date formatting for serializers.py
This commit is contained in:
parent
65a95a90af
commit
72130ca09a
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ class HistoricalRecordField(serializers.ListField):
|
|||
|
||||
class ProductSerializer(serializers.HyperlinkedModelSerializer):
|
||||
date_added = serializers.DateTimeField(
|
||||
format="%d-%m-%Y %I:%M%p", read_only=True)
|
||||
format="%m-%d-%Y %I:%M%p", read_only=True)
|
||||
quantity = serializers.IntegerField(required=False, default=0)
|
||||
history = HistoricalRecordField(read_only=True)
|
||||
|
||||
|
@ -24,7 +24,7 @@ class ProductSerializer(serializers.HyperlinkedModelSerializer):
|
|||
|
||||
class LogSerializer(serializers.HyperlinkedModelSerializer):
|
||||
history_date = serializers.DateTimeField(
|
||||
format="%d-%m-%Y %I:%M%p", read_only=True)
|
||||
format="%m-%d-%Y %I:%M%p", read_only=True)
|
||||
history_user = serializers.ReadOnlyField(source='history_user.username')
|
||||
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in a new issue