{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:22Z","object_id":{"id":1457,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_development","title":"mod_development","uri":"https:\/\/zotonic.com\/id\/1457"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"refers":{"objects":[{"created":"2026-11-11T12:17:47Z","object_id":{"id":1457,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_development","title":"mod_development","uri":"https:\/\/zotonic.com\/id\/1457"},"seq":1000000},{"created":"2026-11-11T12:17:47Z","object_id":{"id":3182,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_development_tools","title":"development_tools","uri":"https:\/\/zotonic.com\/id\/3182"},"seq":1000000},{"created":"2026-11-11T12:17:47Z","object_id":{"id":3183,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_development_capture","title":"development_capture","uri":"https:\/\/zotonic.com\/id\/3183"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"subject":{"objects":[{"created":"2026-09-09T13:48:12Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:12Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-09-09T13:48:12Z","object_id":{"id":2613,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_development_and_debugging","title":"Development and debugging","uri":"https:\/\/zotonic.com\/id\/2613"},"seq":3},{"created":"2026-09-09T13:48:12Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":4},{"created":"2026-09-09T13:48:12Z","object_id":{"id":2657,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_monitor","title":"Monitor","uri":"https:\/\/zotonic.com\/id\/2657"},"seq":5}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"export_revision":4170,"id":1456,"is_a":["text","documentation","reference","model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1456"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_model_model_development","page_url":{"en":"https:\/\/zotonic.com\/docs\/1456\/development","x-default":"https:\/\/zotonic.com\/docs\/1456\/development"},"preview_url":null,"resource":{"version":4167,"pivot_location_lat":null,"title":"development","is_authoritative":true,"body":"<p>Provide the development admin&#39;s settings, tracing controls, observer lists,\ndispatch information, and editor integration.<\/p>\n<p>For structured site inspection use <a href=\"\/id\/doc_model_model_development_tools\" class=\"doc-reference doc-reference-model\"><code>model#development_tools<\/code><\/a>. For browser\ncapture sessions use <a href=\"\/id\/doc_model_model_development_capture\" class=\"doc-reference doc-reference-model\"><code>model#development_capture<\/code><\/a>. Those models have dedicated\nadministrator and non-production checks; this older model has per-path access\nrules, described below.<\/p>\n<h2>Calling the model<\/h2>\n<p>Templates access paths through <code>m.development<\/code>, for example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{% if m.development.show_trace_button %}\n    {# Render the development trace control. #}\n{% endif %}\n<\/code><\/pre>\n<p>HTTP uses <code>\/api\/model\/development\/&lt;method&gt;\/&lt;path&gt;<\/code>. Browser MQTT uses\n<code>bridge\/origin\/model\/development\/&lt;method&gt;\/&lt;path&gt;<\/code>. GET payload fields are HTTP\nquery arguments or MQTT payload fields. The tables below omit these prefixes.<\/p>\n<h2>Flags and diagnostic information<\/h2>\n<table class=\"table\"><thead><tr><th>GET path<\/th><th>Result and access<\/th><\/tr><\/thead><tbody><tr><td><code>is_dbtrace<\/code><\/td><td>Whether database query tracing is enabled in the current context.<\/td><\/tr><tr><td><code>debug_includes<\/code>, <code>debug_blocks<\/code>, <code>enable_api<\/code>, <code>libsep<\/code>, <code>trace_button<\/code>, <code>hide_trace_button<\/code>, <code>livereload<\/code>, <code>nocache<\/code><\/td><td>Boolean module configuration flags.<\/td><\/tr><tr><td><code>function_tracing_enabled<\/code><\/td><td>Global function-tracing setting; restricted to the built-in administrator (user 1).<\/td><\/tr><tr><td><code>show_trace_button<\/code><\/td><td>Whether the current page may show the floating trace button, considering module access, environment, and hide\/show settings.<\/td><\/tr><tr><td><code>list_observers<\/code><\/td><td>Registered notifier observers; requires <code>use mod_development<\/code>.<\/td><\/tr><tr><td><code>record_info\/RECORD<\/code><\/td><td>Runtime record-field metadata, or no value for an unknown record.<\/td><\/tr><tr><td><code>dispatch_info<\/code><\/td><td>Active dispatch rules with source information; requires <code>use mod_development<\/code>.<\/td><\/tr><\/tbody><\/table>\n<p>GET callbacks accept trailing segments for further model lookups. <code>RECORD<\/code> is a\nvariable path segment, not literal text to send.<\/p>\n<h2>Template trace relationships<\/h2>\n<p>These GET paths read the existing human template trace and require\n<code>use mod_development<\/code>. Supply <code>template<\/code> as a source filename in the payload.<\/p>\n<table class=\"table\"><thead><tr><th>Path<\/th><th>Result<\/th><\/tr><\/thead><tbody><tr><td><code>template_trace_parents<\/code><\/td><td>Parent relations for the selected template.<\/td><\/tr><tr><td><code>template_trace_children<\/code><\/td><td>Outgoing relations for the selected template.<\/td><\/tr><tr><td><code>template_trace_filename_menu<\/code><\/td><td>Relations grouped into <code>extends_overrules<\/code> and <code>includes<\/code>.<\/td><\/tr><\/tbody><\/table>\n<p>Parent\/child queries accept optional <code>line<\/code>, <code>column<\/code>, and <code>type<\/code> filters.\nA missing <code>template<\/code> argument returns <code>missing_arg<\/code>. These paths do not create\nor control the separate capture sessions exposed by <a href=\"\/id\/doc_model_model_development_capture\" class=\"doc-reference doc-reference-model\"><code>model#development_capture<\/code><\/a>.<\/p>\n<h2>Legacy build and cache actions<\/h2>\n<p>These GET paths <strong>perform actions<\/strong>; they do not merely report configuration.\nThey are disabled unless <code>mod_development.enable_api<\/code> is true and return\n<code>disabled<\/code> otherwise. When enabled they do not require authentication. Use them\nonly on trusted development installations; they are not needed for the newer\ninspection or capture models.<\/p>\n<table class=\"table\"><thead><tr><th>GET path<\/th><th>Action<\/th><th>Success result<\/th><\/tr><\/thead><tbody><tr><td><code>recompile<\/code><\/td><td>Start recompilation asynchronously.<\/td><td><code>started<\/code><\/td><\/tr><tr><td><code>flush<\/code><\/td><td>Flush caches.<\/td><td><code>flushed<\/code><\/td><\/tr><tr><td><code>reindex<\/code><\/td><td>Reindex modules and reload translations across running site contexts.<\/td><td><code>reindexed<\/code><\/td><\/tr><\/tbody><\/table>\n<h2>Source editor integration<\/h2>\n<table class=\"table\"><thead><tr><th>Method and path<\/th><th>Purpose<\/th><\/tr><\/thead><tbody><tr><td>GET <code>editor<\/code><\/td><td>Editor discovery on development sites; requires module access. Other environments return browser-only information without local probes.<\/td><\/tr><tr><td>GET <code>can_open_directory<\/code><\/td><td>Whether this administrator can open a known installation directory on the server desktop.<\/td><\/tr><tr><td>GET <code>config_source\/FILE<\/code><\/td><td>Signed editor location for an existing node or current-site config file; requires administrator and development-site access.<\/td><\/tr><tr><td>POST <code>editor\/preference<\/code><\/td><td>Save the machine editor choice using payload <code>{editor: ID}<\/code>.<\/td><\/tr><tr><td>POST <code>editor\/open<\/code><\/td><td>Open an indexed template or signed source\/config location.<\/td><\/tr><\/tbody><\/table>\n<p>Editor POST operations require the development environment and\n<code>use mod_development<\/code>. Containers and browser-only configuration disable local\nlaunches. Config locations additionally require administrator access and must\nstill belong to the node&#39;s Erlang init, Zotonic, or current-site configuration.\nSee <a href=\"\/id\/doc_module_mod_development\" class=\"doc-reference doc-reference-module\"><code>module#mod_development<\/code><\/a> for local editor and browser URL setup.<\/p>\n<h3>Opening directories<\/h3>\n<p>The System Information directory buttons invoke <code>open_directory\/2<\/code> through a\nsigned postback. They require an administrator with module access on a\n<code>development<\/code> site, an available desktop opener, and no container\/browser-only\nrestriction.<\/p>\n<p>Accepted keys are <code>files_dir<\/code>, <code>data_dir<\/code>, <code>log_dir<\/code>, <code>config_dir<\/code>, <code>security_dir<\/code>,\n<code>work_dir<\/code>, <code>home<\/code>, and <code>root<\/code>. Paths are resolved on the server; arbitrary paths\nare not accepted. The directory opens on the server desktop, not the browser&#39;s\ncomputer. macOS uses <code>open<\/code>, Linux desktop sessions use <code>xdg-open<\/code>, and Windows\nuses <code>explorer.exe<\/code>, with arguments passed directly to the executable.<\/p>","slug":"development","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"ebaf5376462c14aebe9ffaad748f56c1cc4536f65103f0e8481b6a73ea8271c7","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":322,"is_a":["meta","category"],"name":"model","title":"Models","uri":"https:\/\/test.zotonic.com\/id\/322"},"doc_source_path":"apps\/zotonic_mod_development\/src\/models\/m_development.erl","publication_start":"2023-06-24T08:18:00Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_development\/src\/models\/m_development.erl","pivot_location_lng":null,"doc_source_kind":"model","name":"doc_model_model_development","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:22Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_development","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"8e6aad17c4d86dee983db46a656ed6f6a930bcbb\n","erlang_module":"m_development","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-11-11T14:07:17Z","title_slug":"development"},"uri":"https:\/\/zotonic.com\/id\/1456","uri_template":"https:\/\/zotonic.com\/id\/:id","version":4170,"websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1456"}},"status":"ok"}