Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

User serializer in django rest framework

class Event(models.Model):
    user = models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
    date = models.DateTimeField(default=timezone.now)
    place = models.CharField(max_length=255)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #User #serializer #django #rest #framework
ADD COMMENT
Topic
Name
7+3 =