23 lines
626 B
Python
23 lines
626 B
Python
|
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
|