class EventAPIListCreate( viewsets.ModelViewSet):
queryset = EventAPI.objects.all()
serializer_class = EventAPISerializer
class EventAPISerializer(serializers.ModelSerializer): class Meta:
model = EventAPI fields = '__all__'
[
{
"id": 1,
"name": "Cumple",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 5,
"created_at": "2019-02-05T20:43:01.630400Z",
"organisator": 2
},
{
"id": 2,
"name": "' or 1=1;",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 4,
"created_at": "2019-02-05T20:45:11.265705Z",
"organisator": 2
},......
{
"id": 1,
"name": "Cumple",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 5,
"created_at": "2019-02-05T20:43:01.630400Z",
"organisator": "mye...@gmail.com"
},....
{
"id": 1,
"name": "Cumple",
"location": "calle le corbusier",
"description": "cest le cumple de cyril",
"date": "2019-02-05T01:01:00Z",
"participant": 5,
"created_at": "2019-02-05T20:43:01.630400Z",
"organisator": "Firstname Lastname"
},....
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bc44ca0c-442b-4067-92e0-df9dadc28a47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMQeQjawBsed98R1gNQkXNV9BbRNVHqbgZQ03%2B6t7kf-UTy_qg%40mail.gmail.com.