uncloud/uncloud/uncloud/models.py

23 lines
626 B
Python
Raw Normal View History

2020-03-21 10:59:04 +00:00
from django.db import models
from django.contrib.postgres.fields import JSONField
class UncloudModel(models.Model):
"""
This class extends the standard model with an
extra_data field that can be used to include public,
but internal information.
For instance if you migrate from an existing virtualisation
framework to uncloud.
The extra_data attribute should be considered a hack and whenever
data is necessary for running uncloud, it should **not** be stored
in there.
"""
extra_data = JSONField(editable=False, blank=True, null=True)
class Meta:
abstract = True