Adjusted template for animal properties like {'size_cm': 70, 'names': ['Alfons',...
[toast/alpenzoo.git] / animals / models.py
index 72568d1321e0d7479fa5cc206786a104428b8b07..cc4abdcce8f5ff473323bee1d92a911bbf7b818b 100644 (file)
@@ -1,11 +1,12 @@
 from django.db import models
+import jsonfield # https://github.com/bradjasper/django-jsonfield (7f87e68f)
 
-# Create your models here.
 
 class Animal(models.Model):
     name_german = models.CharField(max_length=255)
     size_cm = models.IntegerField()
     edible = models.BooleanField()
+    properties = jsonfield.JSONField(null=True)
 
     def __str__(self):
         return self.name_german