mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00

* Closes #15042: Move model registration logic to AppConfigs * Refactor register_model() to accept multiple models
13 lines
270 B
Python
13 lines
270 B
Python
from django.apps import AppConfig
|
|
|
|
|
|
class TenancyConfig(AppConfig):
|
|
name = 'tenancy'
|
|
|
|
def ready(self):
|
|
from netbox.models.features import register_models
|
|
from . import search
|
|
|
|
# Register models
|
|
register_models(*self.get_models())
|