add create problem api
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
import json
|
||||
|
||||
from django.utils import timezone
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
class JSONField(serializers.Field):
|
||||
def to_representation(self, value):
|
||||
return json.loads(value)
|
||||
|
||||
|
||||
class DateTimeTZField(serializers.DateTimeField):
|
||||
def to_representation(self, value):
|
||||
self.format = "%Y-%-m-%d %H:%M:%S %Z"
|
||||
|
||||
Reference in New Issue
Block a user