Related to #16145, proposing to allow a URL pattern for scripts to reference them by <module>.<class>. The scope of this request is simply to allow this new URL pattern in addition to the existing scripts/<int:pk>/, scripts/<int:pk>/source/, and scripts/<int:pk>/jobs/ patterns. The templates and Script.get_absolute_url() would still reference the pk. The suggested URL pattern should match the allowed pattern for the API resolved in #16145.
Use case
When using Custom Links to link to a specific script, using the pk is problematic because it's subject to change as the scripts are updated over time. By allowing the <module>.<class> pattern, the custom links could be configured to use that pattern and return the correct script.
NetBox version
v4.1.6
Feature type
New functionality
Triage priority
I volunteer to perform this work (if approved)
Proposed functionality
Related to #16145, proposing to allow a URL pattern for scripts to reference them by
<module>.<class>
. The scope of this request is simply to allow this new URL pattern in addition to the existingscripts/<int:pk>/
,scripts/<int:pk>/source/
, andscripts/<int:pk>/jobs/
patterns. The templates andScript.get_absolute_url()
would still reference the pk. The suggested URL pattern should match the allowed pattern for the API resolved in #16145.Use case
When using Custom Links to link to a specific script, using the pk is problematic because it's subject to change as the scripts are updated over time. By allowing the
<module>.<class>
pattern, the custom links could be configured to use that pattern and return the correct script.Database changes
None
External dependencies
None