|
|
@@ -1,4 +1,5 @@
|
|
|
import inspect
|
|
|
+import warnings
|
|
|
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
from netbox.registry import registry
|
|
|
@@ -37,7 +38,12 @@ def register_template_extensions(class_list):
|
|
|
# Registration for multiple models
|
|
|
models = template_extension.models
|
|
|
elif template_extension.model:
|
|
|
- # Registration for a single model
|
|
|
+ # Registration for a single model (deprecated)
|
|
|
+ warnings.warn(
|
|
|
+ "PluginTemplateExtension.model is deprecated and will be removed in a future release. Use "
|
|
|
+ "'models' instead.",
|
|
|
+ DeprecationWarning
|
|
|
+ )
|
|
|
models = [template_extension.model]
|
|
|
else:
|
|
|
# Global registration (no specific models)
|