mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 18:45:40 +00:00
Build order rules (#7842)
* Add new global setting * Check if there are open children before completing a build * Adds management command to export settings definition * Fix settings export * Extract settings data into documentation * Add global settings spec * User settings * Revert strict mode * Tweak unit test * Remove unreachable code * Always export settings first * Remove unused macro * Remove old images * Re-add missing docs strings * Tweak docs * Remove unused import
This commit is contained in:
15
tasks.py
15
tasks.py
@ -1074,6 +1074,16 @@ def schema(
|
||||
print('Schema export completed:', filename)
|
||||
|
||||
|
||||
@task
|
||||
def export_settings_definitions(c, filename='inventree_settings.json', overwrite=False):
|
||||
"""Export settings definition to a JSON file."""
|
||||
filename = Path(filename).resolve()
|
||||
check_file_existance(filename, overwrite)
|
||||
|
||||
print(f"Exporting settings definition to '{filename}'...")
|
||||
manage(c, f'export_settings_definitions {filename}', pty=True)
|
||||
|
||||
|
||||
@task(default=True)
|
||||
def version(c):
|
||||
"""Show the current version of InvenTree."""
|
||||
@ -1406,6 +1416,11 @@ via your signed in browser, or consider using a point release download via invok
|
||||
)
|
||||
def docs_server(c, address='localhost:8080', compile_schema=False):
|
||||
"""Start a local mkdocs server to view the documentation."""
|
||||
# Extract settings definitions
|
||||
export_settings_definitions(
|
||||
c, filename='docs/inventree_settings.json', overwrite=True
|
||||
)
|
||||
|
||||
if compile_schema:
|
||||
# Build the schema docs first
|
||||
schema(c, ignore_warnings=True, overwrite=True, filename='docs/schema.yml')
|
||||
|
Reference in New Issue
Block a user