mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-06 11:31:04 +00:00
Enhancements for recort import/export (#11630)
* Add management command to list installed apps * Add metadata to exported data file * Validate metadata for imported file * Update CHANGELOG.md * Update docs * Use internal codes * Refactor and add more metadata * Adjust github action workflow * Run with --force option to setup demo dataset
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Custom management command to list all installed apps.
|
||||
|
||||
This is used to determine which apps are installed,
|
||||
including any apps which are defined for plugins.
|
||||
"""
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""List all installed apps."""
|
||||
|
||||
def handle(self, *args, **kwargs):
|
||||
"""List all installed apps.
|
||||
|
||||
Note that this function outputs in a particular format,
|
||||
which is expected by the calling code in tasks.py
|
||||
"""
|
||||
from django.apps import apps
|
||||
|
||||
app_list = []
|
||||
|
||||
for app in apps.get_app_configs():
|
||||
app_list.append(app.name)
|
||||
|
||||
app_list.sort()
|
||||
|
||||
self.stdout.write(f'Installed Apps: {len(app_list)}')
|
||||
self.stdout.write('>>> ' + ','.join(app_list) + ' <<<')
|
||||
@@ -119,6 +119,7 @@ def isGeneratingSchema():
|
||||
'collectstatic',
|
||||
'makemessages',
|
||||
'wait_for_db',
|
||||
'list_apps',
|
||||
'gunicorn',
|
||||
'sqlflush',
|
||||
'qcluster',
|
||||
|
||||
Reference in New Issue
Block a user