|
|
@@ -1,4 +1,5 @@
|
|
|
import logging
|
|
|
+import warnings
|
|
|
|
|
|
from django.contrib.contenttypes.fields import GenericForeignKey
|
|
|
from django.db import models, transaction
|
|
|
@@ -44,6 +45,13 @@ class Branch(ChangeLoggedModel):
|
|
|
verbose_name = _('branch')
|
|
|
verbose_name_plural = _('branches')
|
|
|
|
|
|
+ def __init__(self, *args, **kwargs):
|
|
|
+ warnings.warn(
|
|
|
+ 'The staged changes functionality has been deprecated and will be removed in a future release.',
|
|
|
+ DeprecationWarning
|
|
|
+ )
|
|
|
+ super().__init__(*args, **kwargs)
|
|
|
+
|
|
|
def __str__(self):
|
|
|
return f'{self.name} ({self.pk})'
|
|
|
|
|
|
@@ -97,6 +105,13 @@ class StagedChange(CustomValidationMixin, EventRulesMixin, models.Model):
|
|
|
verbose_name = _('staged change')
|
|
|
verbose_name_plural = _('staged changes')
|
|
|
|
|
|
+ def __init__(self, *args, **kwargs):
|
|
|
+ warnings.warn(
|
|
|
+ 'The staged changes functionality has been deprecated and will be removed in a future release.',
|
|
|
+ DeprecationWarning
|
|
|
+ )
|
|
|
+ super().__init__(*args, **kwargs)
|
|
|
+
|
|
|
def __str__(self):
|
|
|
action = self.get_action_display()
|
|
|
app_label, model_name = self.object_type.natural_key()
|