2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Model introspection

- Find the class registered to the model (or log an error)
- Pass the api_url through to the frontend
This commit is contained in:
Oliver
2022-05-12 17:28:55 +10:00
parent e112d555d4
commit a81ea01e8e
6 changed files with 84 additions and 9 deletions

View File

@ -137,7 +137,7 @@ class PluginSetting(common.models.BaseInvenTreeSetting):
if 'settings' not in kwargs:
plugin = kwargs.pop('plugin')
plugin = kwargs.pop('plugin', None)
if plugin:

View File

@ -68,7 +68,12 @@ class SampleIntegrationPlugin(AppMixin, SettingsMixin, UrlsMixin, NavigationMixi
'SELECT_COMPANY': {
'name': 'Company',
'description': 'Select a company object from the database',
'model': 'company.Company',
'model': 'company.company',
},
'SELECT_PART': {
'name': 'Part',
'description': 'Select a part object from the database',
'model': 'part.part',
},
}