mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#8684: Remove obsolete 'obj' var from custom link context
This commit is contained in:
@ -27,7 +27,6 @@ The following context data is available within the template when rendering a cus
|
|||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|-----------|-------------------------------------------------------------------------------------------------------------------|
|
|-----------|-------------------------------------------------------------------------------------------------------------------|
|
||||||
| `object` | The NetBox object being displayed |
|
| `object` | The NetBox object being displayed |
|
||||||
| `obj` | Same as `object`; maintained for backward compatability until NetBox v3.5 |
|
|
||||||
| `debug` | A boolean indicating whether debugging is enabled |
|
| `debug` | A boolean indicating whether debugging is enabled |
|
||||||
| `request` | The current WSGI request |
|
| `request` | The current WSGI request |
|
||||||
| `user` | The current user (if authenticated) |
|
| `user` | The current user (if authenticated) |
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
* The JobResult model has been moved from the `extras` app to `core` and renamed to Job. Accordingly, its REST API endpoint has been moved from `/api/extras/job-results/` to `/api/core/jobs/`.
|
* The JobResult model has been moved from the `extras` app to `core` and renamed to Job. Accordingly, its REST API endpoint has been moved from `/api/extras/job-results/` to `/api/core/jobs/`.
|
||||||
* The `obj_type` field on the Job model (previously JobResult) has been renamed to `object_type` for consistency with other models.
|
* The `obj_type` field on the Job model (previously JobResult) has been renamed to `object_type` for consistency with other models.
|
||||||
* The `JOBRESULT_RETENTION` configuration parameter has been renamed to `JOB_RETENTION`.
|
* The `JOBRESULT_RETENTION` configuration parameter has been renamed to `JOB_RETENTION`.
|
||||||
|
* The `obj` context variable is no longer passed when rendering custom links: Use `object` instead.
|
||||||
* The REST API schema is now generated using the OpenAPI 3.0 spec
|
* The REST API schema is now generated using the OpenAPI 3.0 spec
|
||||||
* The URLs for the REST API schema documentation have changed:
|
* The URLs for the REST API schema documentation have changed:
|
||||||
* `/api/docs/` is now `/api/schema/swagger-ui/`
|
* `/api/docs/` is now `/api/schema/swagger-ui/`
|
||||||
|
@ -40,7 +40,6 @@ def custom_links(context, obj):
|
|||||||
# Pass select context data when rendering the CustomLink
|
# Pass select context data when rendering the CustomLink
|
||||||
link_context = {
|
link_context = {
|
||||||
'object': obj,
|
'object': obj,
|
||||||
'obj': obj, # TODO: Remove in NetBox v3.5
|
|
||||||
'debug': context.get('debug', False), # django.template.context_processors.debug
|
'debug': context.get('debug', False), # django.template.context_processors.debug
|
||||||
'request': context['request'], # django.template.context_processors.request
|
'request': context['request'], # django.template.context_processors.request
|
||||||
'user': context['user'], # django.contrib.auth.context_processors.auth
|
'user': context['user'], # django.contrib.auth.context_processors.auth
|
||||||
|
Reference in New Issue
Block a user