|
|
@@ -95,9 +95,9 @@ class MyModel(JobsMixin, NetBoxModel):
|
|
|
|
|
|
### Result URLs
|
|
|
|
|
|
-By default, links to a job (such as those in the jobs list and in job completion notifications) lead to its generic view. A plugin which provides its own page for presenting the results of jobs associated with one of its models can register a function which returns the URL of that page, using the `register_job_result_url()` decorator from `core.utils`. The function accepts a Job instance and returns either a URL, or `None` to fall back to the generic view.
|
|
|
+By default, links to a job (such as those in the jobs list and in job completion notifications) lead to its generic view. A plugin which provides its own page for presenting the results of jobs associated with one of its models can register a function which returns the URL of that page, using the `register_job_result_url()` decorator from `core.utils`. The function accepts a Job instance and returns either a URL, or `None` to decline.
|
|
|
|
|
|
-Optionally, a job name may be specified to restrict the function to jobs having that name. A function registered for a specific job name takes precedence over one registered for the model alone. Only one function may be registered for each combination of model and job name.
|
|
|
+Optionally, a job name may be specified to restrict the function to jobs having that name. A function registered for a specific job name takes precedence over one registered for the model alone, which is consulted if the former returns `None`. The generic view is used if no function returns a URL. Only one function may be registered for each combination of model and job name.
|
|
|
|
|
|
#### Example
|
|
|
|