arrayfield django example

Solutions on MaxInterview for arrayfield django example by the best coders in the world

showing results for - "arrayfield django example"
Elena
16 Jul 2017
1 from django.db import models, FloatField
2 from django.contrib.postgres.fields import ArrayField
3 
4 class Book(models.Model):
5     ratings = ArrayField(FloatField())
Anna
27 May 2017
1from django.contrib.postgres.fields import ArrayField
2from django.db import models
3
4class ChessBoard(models.Model):
5    board = ArrayField(
6        ArrayField(
7            models.CharField(max_length=10, blank=True),
8            size=8,
9        ),
10        size=8,
11    )