diff --git a/docs/admin/admin.md b/docs/admin/admin.md index c4b823e..030def7 100644 --- a/docs/admin/admin.md +++ b/docs/admin/admin.md @@ -25,6 +25,9 @@ An adminstation panel will be presented as shown below: {% include 'img.html' %} {% endwith %} +!!! info "Admin URL" + To directly access the admin iterface, append /admin/ to the InvenTree site URL - e.g. http://localhost:8000/admin/ + ### View Database Objects Database objects can be listed and filtered directly. The image below shows an example of displaying existing part categories. diff --git a/docs/admin/logs.md b/docs/admin/logs.md new file mode 100644 index 0000000..9722dfe --- /dev/null +++ b/docs/admin/logs.md @@ -0,0 +1,25 @@ +--- +title: Admin Shell +--- + +## Error Logs + +Any critical server error logs are recorded to the database, and can be viewed by staff users using the admin interface. + +In the admin interface, select the "Errors" view: + +{% with id="admin_error_link", url="admin/admin_errors_link.png", description="Admin errors" %} +{% include 'img.html' %} +{% endwith %} + +!!! note "URL" + Alternatively, navigate to the error list view at /admin/error_report/error/ + +A list of error logs is presented. + +{% with id="admin_error_logs", url="admin/admin_errors.png", description="Error logs" %} +{% include 'img.html' %} +{% endwith %} + +!!! note "Deleting Logs" + Error logs should be deleted periodically \ No newline at end of file diff --git a/docs/admin/shell.md b/docs/admin/shell.md new file mode 100644 index 0000000..6bdd259 --- /dev/null +++ b/docs/admin/shell.md @@ -0,0 +1,24 @@ +--- +title: Admin Shell +--- + +## Python Shell + +A Python shell interface is provided at /admin/shell/. + +This interface allows advanced users direct access to the underlying database objects using Python. + +!!! warning "Danger" + The scripting shell interface should only ever be used by advanced users. It requires intimate knowledge of the underlying InvenTree code, and improper use could easily result in corruption of data + +!!! warning "Seriously" + If you are not 100% sure of what you are doing, do not use the shell interface + +!!! info "Enabling Shell Mode" + The admin shell is (by default) only enabled when InvenTree is running in DEBUG mode + +The shell interface allows Python queries to be run by the admin user, as shown below: + +{% with id="admin_shell", url="admin/shell.png", description="Admin shell interface" %} +{% include 'img.html' %} +{% endwith %} \ No newline at end of file diff --git a/docs/assets/images/admin/admin_errors.png b/docs/assets/images/admin/admin_errors.png new file mode 100644 index 0000000..8dfcd41 Binary files /dev/null and b/docs/assets/images/admin/admin_errors.png differ diff --git a/docs/assets/images/admin/admin_errors_link.png b/docs/assets/images/admin/admin_errors_link.png new file mode 100644 index 0000000..5727ea7 Binary files /dev/null and b/docs/assets/images/admin/admin_errors_link.png differ diff --git a/docs/assets/images/admin/shell.png b/docs/assets/images/admin/shell.png new file mode 100644 index 0000000..016fd38 Binary files /dev/null and b/docs/assets/images/admin/shell.png differ diff --git a/mkdocs.yml b/mkdocs.yml index 8bc9356..15a6208 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -73,6 +73,8 @@ nav: - User Permissions: admin/permissions.md - Export Data: admin/export.md - Import Data: admin/import.md + - Python Shell: admin/shell.md + - Error Logs: admin/logs.md - Extend: - API: extend/api.md - Python Interface: extend/python.md