Added JSON field to animal model.
[toast/alpenzoo.git] / animals / models.py
1 from django.db import models
2 import jsonfield # https://github.com/bradjasper/django-jsonfield (7f87e68f)
3
4
5 class Animal(models.Model):
6     name_german = models.CharField(max_length=255)
7     size_cm = models.IntegerField()
8     edible = models.BooleanField()
9     properties = jsonfield.JSONField(null=True)
10
11     def __str__(self):
12         return self.name_german
13
14