From 745a815d27bcd0d05b3dd0d34897d14ef808610a Mon Sep 17 00:00:00 2001 From: 8ctorres Date: Sun, 7 Apr 2024 12:00:11 +0000 Subject: [PATCH 1/5] Add references to Nbshell in export templates, reports and scripts --- docs/administration/netbox-shell.md | 36 +++++++++++++++++++++++- docs/customization/custom-scripts.md | 9 ++++++ docs/customization/export-templates.md | 2 ++ docs/customization/reports.md | 6 +++- docs/features/configuration-rendering.md | 2 ++ 5 files changed, 53 insertions(+), 2 deletions(-) diff --git a/docs/administration/netbox-shell.md b/docs/administration/netbox-shell.md index 21cef01b2..8a62c2a3c 100644 --- a/docs/administration/netbox-shell.md +++ b/docs/administration/netbox-shell.md @@ -1,6 +1,6 @@ # The NetBox Python Shell -NetBox includes a Python management shell within which objects can be directly queried, created, modified, and deleted. To enter the shell, run the following command: +NetBox includes a Python management shell within which objects can be directly queried, created, modified, and deleted. To enter the shell, run the following command from a shell that has the netbox virtualenv activated: ``` ./manage.py nbshell @@ -143,6 +143,40 @@ To return the inverse of a filtered queryset, use `exclude()` instead of `filter 346 ``` +If the query returns only one object, the get() method can be used. This method will yield the actual object resulting from the query, instead of a QuerySet. For this to work, the query must return only one object. The syntax is identical to the filter and exclude methods. For example, we can get a device from it's asset tag: + +``` +>>> +>>> Device.objects.get(asset_tag="100079912515") + +>>> +``` + +If the query returns more than one object, a MultipleObjectsReturned exception will be thrown: + +``` +>>> Device.objects.get(role_id=13) +Traceback (most recent call last): + File "", line 1, in + File "/srv/netbox/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method + return getattr(self.get_queryset(), name)(*args, **kwargs) + File "/srv/netbox/venv/lib/python3.10/site-packages/django/db/models/query.py", line 640, in get + raise self.model.MultipleObjectsReturned( +dcim.models.devices.Device.MultipleObjectsReturned: get() returned more than one Device -- it returned more than 20! +>>> +``` + +Queries can all also be executed from a particular object instead of from the model itself. For instance, to get all circuits that are assigned to one site, it is easier to filter from the site itself, instead of using the "Circuit" model and building the query from there. This is particularly useful for configuration templates and export templates, since it allows to query other database objects that are related to the object that we're rendering the template for. + +``` +>>> site.circuit_terminations.all() +, ]> +>>> +``` + +The same methods (all, filter, exclude, get...) can be used in this kind of queries. + + !!! info The examples above are intended only to provide a cursory introduction to queryset filtering. For an exhaustive list of the available filters, please consult the [Django queryset API documentation](https://docs.djangoproject.com/en/stable/ref/models/querysets/). diff --git a/docs/customization/custom-scripts.md b/docs/customization/custom-scripts.md index c68bc21f1..7775ee2ef 100644 --- a/docs/customization/custom-scripts.md +++ b/docs/customization/custom-scripts.md @@ -56,6 +56,15 @@ class AnotherCustomScript(Script): script_order = (MyCustomScript, AnotherCustomScript) ``` +### The run() method + +The run() method is the entrypoint for the script, and it runs in the context of Netbox's own execution environment. This means from here, everything inside Netbox itself is accesible. The [Netbox Shell](../administration/netbox-shell.md) is a good resource to keep in hand, since it allows to see the objects in Netbox in the same way the run() method of the script does. + +The run() method can itself call other methods that are in the same module but outside the "MyCustomScript" class, and if there are several scripts in the same module (this is, in the same Python file), both scripts can reuse the same auxiliary methods, keeping the code cleaner. For this reason, it is encouraged to keep similar scripts in the same module. + +The run() method can return a string, and this will be displayed in a text box in the web interface after the script finishes. This is useful, for instance, for returning a piece of configuration or information that you want the user to be able to easily copy and paste somewhere else. + + ## Module Attributes ### `name` diff --git a/docs/customization/export-templates.md b/docs/customization/export-templates.md index 640a97531..8be160011 100644 --- a/docs/customization/export-templates.md +++ b/docs/customization/export-templates.md @@ -32,6 +32,8 @@ If you need to use the config context data in an export template, you'll should {% endfor %} ``` +To see all the attributes of a given object, you can use the [Netbox Shell](../administration/netbox-shell.md). It supports autocompletion and allows one to see all of the methods and attributes a given object type has. All of them can be called from within a Jinja template. Using queries from one object to another, one can navigate pretty much the entire Netbox object model. For instance, from an export template for sites, one can get the devices that are in that site, the circuits that are connected to those devices, the providers that serve those circuits... etc, so an export template is not limited to just the model that it's being called from. In fact, the same result can be achieved in different ways, depending on which model you start from. + The `as_attachment` attribute of an export template controls its behavior when rendered. If true, the rendered content will be returned to the user as a downloadable file. If false, it will be displayed within the browser. (This may be handy e.g. for generating HTML content.) A MIME type and file extension can optionally be defined for each export template. The default MIME type is `text/plain`. diff --git a/docs/customization/reports.md b/docs/customization/reports.md index 8b0fc44f3..2dbb7656d 100644 --- a/docs/customization/reports.md +++ b/docs/customization/reports.md @@ -29,7 +29,9 @@ class DeviceIPsReport(Report): description = "Check that every device has a primary IP address assigned" ``` -Within each report class, we'll create a number of test methods to execute our report's logic. In DeviceConnectionsReport, for instance, we want to ensure that every live device has a console connection, an out-of-band management connection, and two power connections. +Within each report class, we'll create a number of test methods to execute our report's logic. The method's name must start with "test_" and it takes no arguments. + +In DeviceConnectionsReport, for instance, we want to ensure that every live device has a console connection, an out-of-band management connection, and two power connections. ``` from dcim.choices import DeviceStatusChoices @@ -82,6 +84,8 @@ class DeviceConnectionsReport(Report): As you can see, reports are completely customizable. Validation logic can be as simple or as complex as needed. Also note that the `description` attribute support markdown syntax. It will be rendered in the report list page. +In the same way scripts do, reports run from within Netbox's own environment and can access the objects inside Netbox directly. The [Netbox Shell](../administration/netbox-shell.md) is a good resource to keep in hand, since it allows to see the objects in Netbox in the same way the test methods of a report do. + !!! warning Reports should never alter data: If you find yourself using the `create()`, `save()`, `update()`, or `delete()` methods on objects within reports, stop and re-evaluate what you're trying to accomplish. Note that there are no safeguards against the accidental alteration or destruction of data. diff --git a/docs/features/configuration-rendering.md b/docs/features/configuration-rendering.md index 44cacc684..2ebc0f25e 100644 --- a/docs/features/configuration-rendering.md +++ b/docs/features/configuration-rendering.md @@ -35,6 +35,8 @@ Configuration templates are written in the [Jinja2 templating language](https:// {% endblock %} ``` +To see all the attributes of a given object, you can use the [Netbox Shell](../administration/netbox-shell.md). It supports autocompletion and allows one to see all of the methods and attributes a given object type has. All of them can be called from within the configuration template. Also, other objects, for instance, a device's interfaces or connected circuits can be accessed from the template itself, so the rendered configuration may include information not only about the device itself, but also related objects like IP addresses or circuits. + When rendered for a specific NetBox device, the template's `device` variable will be populated with the device instance, and `ntp_servers` will be pulled from the device's available context data. The resulting output will be a valid configuration segment that can be applied directly to a compatible network device. ### Context Data From c29c257cd82ef5104cb5c5a2cd705550836beff3 Mon Sep 17 00:00:00 2001 From: 8ctorres Date: Sun, 26 May 2024 11:34:52 +0200 Subject: [PATCH 2/5] Corrections in documentation about nbshell --- docs/administration/netbox-shell.md | 38 +++--------------------- docs/customization/custom-scripts.md | 8 ++--- docs/customization/export-templates.md | 3 +- docs/customization/reports.md | 5 ++-- docs/features/configuration-rendering.md | 3 +- 5 files changed, 14 insertions(+), 43 deletions(-) diff --git a/docs/administration/netbox-shell.md b/docs/administration/netbox-shell.md index 8a62c2a3c..c8be38ce4 100644 --- a/docs/administration/netbox-shell.md +++ b/docs/administration/netbox-shell.md @@ -1,6 +1,6 @@ # The NetBox Python Shell -NetBox includes a Python management shell within which objects can be directly queried, created, modified, and deleted. To enter the shell, run the following command from a shell that has the netbox virtualenv activated: +NetBox includes a Python management shell within which objects can be directly queried, created, modified, and deleted. To enter the shell, run the following command with the appropriate Python virtual environment activated: ``` ./manage.py nbshell @@ -105,6 +105,8 @@ This approach can span multiple levels of relations. For example, the following >>> IPAddress.objects.filter(interface__device__site__region__slug="north-america") ``` +The `get()` method can be used in place of the `filter()` method if we expect this query to return only one object. This method will yield the actual object resulting from the query, instead of a QuerySet. If the query returns more than one result, it will raise an exception. + !!! note While the above query is functional, it's not very efficient. There are ways to optimize such requests, however they are out of scope for this document. For more information, see the [Django queryset method reference](https://docs.djangoproject.com/en/stable/ref/models/querysets/) documentation. @@ -143,39 +145,7 @@ To return the inverse of a filtered queryset, use `exclude()` instead of `filter 346 ``` -If the query returns only one object, the get() method can be used. This method will yield the actual object resulting from the query, instead of a QuerySet. For this to work, the query must return only one object. The syntax is identical to the filter and exclude methods. For example, we can get a device from it's asset tag: - -``` ->>> ->>> Device.objects.get(asset_tag="100079912515") - ->>> -``` - -If the query returns more than one object, a MultipleObjectsReturned exception will be thrown: - -``` ->>> Device.objects.get(role_id=13) -Traceback (most recent call last): - File "", line 1, in - File "/srv/netbox/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method - return getattr(self.get_queryset(), name)(*args, **kwargs) - File "/srv/netbox/venv/lib/python3.10/site-packages/django/db/models/query.py", line 640, in get - raise self.model.MultipleObjectsReturned( -dcim.models.devices.Device.MultipleObjectsReturned: get() returned more than one Device -- it returned more than 20! ->>> -``` - -Queries can all also be executed from a particular object instead of from the model itself. For instance, to get all circuits that are assigned to one site, it is easier to filter from the site itself, instead of using the "Circuit" model and building the query from there. This is particularly useful for configuration templates and export templates, since it allows to query other database objects that are related to the object that we're rendering the template for. - -``` ->>> site.circuit_terminations.all() -, ]> ->>> -``` - -The same methods (all, filter, exclude, get...) can be used in this kind of queries. - +Queries can all also be executed from a particular object instead of from the model itself. For instance, to get all circuits that are assigned to one site, it is easier to filter from the site itself, instead of using the "Circuit" model and building the query from there. This is particularly useful for configuration templates and export templates, since it allows to query other database objects that are related to the object that we're rendering the template for. The same methods (all, filter, exclude, get...) can be used in this kind of queries. !!! info The examples above are intended only to provide a cursory introduction to queryset filtering. For an exhaustive list of the available filters, please consult the [Django queryset API documentation](https://docs.djangoproject.com/en/stable/ref/models/querysets/). diff --git a/docs/customization/custom-scripts.md b/docs/customization/custom-scripts.md index 7775ee2ef..b143c630c 100644 --- a/docs/customization/custom-scripts.md +++ b/docs/customization/custom-scripts.md @@ -56,13 +56,11 @@ class AnotherCustomScript(Script): script_order = (MyCustomScript, AnotherCustomScript) ``` -### The run() method +### The `run()` Method -The run() method is the entrypoint for the script, and it runs in the context of Netbox's own execution environment. This means from here, everything inside Netbox itself is accesible. The [Netbox Shell](../administration/netbox-shell.md) is a good resource to keep in hand, since it allows to see the objects in Netbox in the same way the run() method of the script does. +The `run()` method is the entrypoint for the script, and it runs in the context of NetBox's own execution environment. This means from here, everything inside NetBox itself is accesible. The [NetBox Shell](../administration/netbox-shell.md) is a good resource to keep in hand, since it allows to see the objects in NetBox in the same way the script does. -The run() method can itself call other methods that are in the same module but outside the "MyCustomScript" class, and if there are several scripts in the same module (this is, in the same Python file), both scripts can reuse the same auxiliary methods, keeping the code cleaner. For this reason, it is encouraged to keep similar scripts in the same module. - -The run() method can return a string, and this will be displayed in a text box in the web interface after the script finishes. This is useful, for instance, for returning a piece of configuration or information that you want the user to be able to easily copy and paste somewhere else. +The `run()` method can itself call other methods that are in the same module but outside the "MyCustomScript" class, and if there are several scripts in the same module (this is, in the same Python file), both scripts can reuse the same auxiliary methods, keeping the code cleaner. For this reason, it is encouraged to keep similar scripts in the same module. Script can return a string, which will be displayed in a text box in the web interface after the script finishes. This is useful, for instance, for returning a piece of configuration or information that you want the user to be able to easily copy and paste somewhere else. ## Module Attributes diff --git a/docs/customization/export-templates.md b/docs/customization/export-templates.md index 8be160011..7e027d11f 100644 --- a/docs/customization/export-templates.md +++ b/docs/customization/export-templates.md @@ -32,7 +32,8 @@ If you need to use the config context data in an export template, you'll should {% endfor %} ``` -To see all the attributes of a given object, you can use the [Netbox Shell](../administration/netbox-shell.md). It supports autocompletion and allows one to see all of the methods and attributes a given object type has. All of them can be called from within a Jinja template. Using queries from one object to another, one can navigate pretty much the entire Netbox object model. For instance, from an export template for sites, one can get the devices that are in that site, the circuits that are connected to those devices, the providers that serve those circuits... etc, so an export template is not limited to just the model that it's being called from. In fact, the same result can be achieved in different ways, depending on which model you start from. +!!! info + To see all the attributes of a given object, you can use the [NetBox Shell](../administration/netbox-shell.md). It supports autocompletion and allows one to see all of the methods and attributes a given object type has. All of them can be called from within a Jinja template. The `as_attachment` attribute of an export template controls its behavior when rendered. If true, the rendered content will be returned to the user as a downloadable file. If false, it will be displayed within the browser. (This may be handy e.g. for generating HTML content.) diff --git a/docs/customization/reports.md b/docs/customization/reports.md index 2dbb7656d..eec273b4f 100644 --- a/docs/customization/reports.md +++ b/docs/customization/reports.md @@ -29,7 +29,7 @@ class DeviceIPsReport(Report): description = "Check that every device has a primary IP address assigned" ``` -Within each report class, we'll create a number of test methods to execute our report's logic. The method's name must start with "test_" and it takes no arguments. +Within each report class, we'll create a number of test methods to execute our report's logic. The name of each method must begin with `test_` and the method must accept no arguments. In DeviceConnectionsReport, for instance, we want to ensure that every live device has a console connection, an out-of-band management connection, and two power connections. @@ -84,7 +84,8 @@ class DeviceConnectionsReport(Report): As you can see, reports are completely customizable. Validation logic can be as simple or as complex as needed. Also note that the `description` attribute support markdown syntax. It will be rendered in the report list page. -In the same way scripts do, reports run from within Netbox's own environment and can access the objects inside Netbox directly. The [Netbox Shell](../administration/netbox-shell.md) is a good resource to keep in hand, since it allows to see the objects in Netbox in the same way the test methods of a report do. +!!! info + In the same way scripts do, reports run from within NetBox's own environment and can access the objects inside NetBox directly. The [NetBox Shell](../administration/netbox-shell.md) is a good resource to keep in hand, since it allows to see the objects in NetBox in the same way the reports and scripts do. !!! warning Reports should never alter data: If you find yourself using the `create()`, `save()`, `update()`, or `delete()` methods on objects within reports, stop and re-evaluate what you're trying to accomplish. Note that there are no safeguards against the accidental alteration or destruction of data. diff --git a/docs/features/configuration-rendering.md b/docs/features/configuration-rendering.md index 2ebc0f25e..ab4b43a33 100644 --- a/docs/features/configuration-rendering.md +++ b/docs/features/configuration-rendering.md @@ -35,7 +35,8 @@ Configuration templates are written in the [Jinja2 templating language](https:// {% endblock %} ``` -To see all the attributes of a given object, you can use the [Netbox Shell](../administration/netbox-shell.md). It supports autocompletion and allows one to see all of the methods and attributes a given object type has. All of them can be called from within the configuration template. Also, other objects, for instance, a device's interfaces or connected circuits can be accessed from the template itself, so the rendered configuration may include information not only about the device itself, but also related objects like IP addresses or circuits. +!!! info + To see all the attributes of a given object, you can use the [NetBox Shell](../administration/netbox-shell.md). It supports autocompletion and allows one to see all of the methods and attributes a given object type has. All of them can be called from within the configuration template. When rendered for a specific NetBox device, the template's `device` variable will be populated with the device instance, and `ntp_servers` will be pulled from the device's available context data. The resulting output will be a valid configuration segment that can be applied directly to a compatible network device. From 6da24c909fd945e7efa260ab1b535d58ac53c1f5 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 15 Jun 2024 05:12:56 +0000 Subject: [PATCH 3/5] Update source translation strings --- netbox/translations/en/LC_MESSAGES/django.po | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/netbox/translations/en/LC_MESSAGES/django.po b/netbox/translations/en/LC_MESSAGES/django.po index 7a60e6028..365255903 100644 --- a/netbox/translations/en/LC_MESSAGES/django.po +++ b/netbox/translations/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-13 05:02+0000\n" +"POT-Creation-Date: 2024-06-15 05:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -7686,56 +7686,56 @@ msgstr "" msgid "Date values must be in ISO 8601 format (YYYY-MM-DD)." msgstr "" -#: netbox/extras/models/customfields.py:667 +#: netbox/extras/models/customfields.py:671 msgid "Date and time values must be in ISO 8601 format (YYYY-MM-DD HH:MM:SS)." msgstr "" -#: netbox/extras/models/customfields.py:674 +#: netbox/extras/models/customfields.py:678 #, python-brace-format msgid "Invalid choice ({value}) for choice set {choiceset}." msgstr "" -#: netbox/extras/models/customfields.py:684 +#: netbox/extras/models/customfields.py:688 #, python-brace-format msgid "Invalid choice(s) ({value}) for choice set {choiceset}." msgstr "" -#: netbox/extras/models/customfields.py:693 +#: netbox/extras/models/customfields.py:697 #, python-brace-format msgid "Value must be an object ID, not {type}" msgstr "" -#: netbox/extras/models/customfields.py:699 +#: netbox/extras/models/customfields.py:703 #, python-brace-format msgid "Value must be a list of object IDs, not {type}" msgstr "" -#: netbox/extras/models/customfields.py:703 +#: netbox/extras/models/customfields.py:707 #, python-brace-format msgid "Found invalid object ID: {id}" msgstr "" -#: netbox/extras/models/customfields.py:706 +#: netbox/extras/models/customfields.py:710 msgid "Required field cannot be empty." msgstr "" -#: netbox/extras/models/customfields.py:725 +#: netbox/extras/models/customfields.py:729 msgid "Base set of predefined choices (optional)" msgstr "" -#: netbox/extras/models/customfields.py:737 +#: netbox/extras/models/customfields.py:741 msgid "Choices are automatically ordered alphabetically" msgstr "" -#: netbox/extras/models/customfields.py:744 +#: netbox/extras/models/customfields.py:748 msgid "custom field choice set" msgstr "" -#: netbox/extras/models/customfields.py:745 +#: netbox/extras/models/customfields.py:749 msgid "custom field choice sets" msgstr "" -#: netbox/extras/models/customfields.py:781 +#: netbox/extras/models/customfields.py:785 msgid "Must define base or extra choices." msgstr "" From eb4b83ab137d330dbba835b32ad268d3d83b5a03 Mon Sep 17 00:00:00 2001 From: 8ctorres Date: Wed, 19 Jun 2024 21:19:51 +0200 Subject: [PATCH 4/5] Revert "Update source translation strings" This reverts commit 6da24c909fd945e7efa260ab1b535d58ac53c1f5 which was auto generated by github-bot --- netbox/translations/en/LC_MESSAGES/django.po | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/netbox/translations/en/LC_MESSAGES/django.po b/netbox/translations/en/LC_MESSAGES/django.po index 365255903..7a60e6028 100644 --- a/netbox/translations/en/LC_MESSAGES/django.po +++ b/netbox/translations/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-15 05:12+0000\n" +"POT-Creation-Date: 2024-06-13 05:02+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -7686,56 +7686,56 @@ msgstr "" msgid "Date values must be in ISO 8601 format (YYYY-MM-DD)." msgstr "" -#: netbox/extras/models/customfields.py:671 +#: netbox/extras/models/customfields.py:667 msgid "Date and time values must be in ISO 8601 format (YYYY-MM-DD HH:MM:SS)." msgstr "" -#: netbox/extras/models/customfields.py:678 +#: netbox/extras/models/customfields.py:674 #, python-brace-format msgid "Invalid choice ({value}) for choice set {choiceset}." msgstr "" -#: netbox/extras/models/customfields.py:688 +#: netbox/extras/models/customfields.py:684 #, python-brace-format msgid "Invalid choice(s) ({value}) for choice set {choiceset}." msgstr "" -#: netbox/extras/models/customfields.py:697 +#: netbox/extras/models/customfields.py:693 #, python-brace-format msgid "Value must be an object ID, not {type}" msgstr "" -#: netbox/extras/models/customfields.py:703 +#: netbox/extras/models/customfields.py:699 #, python-brace-format msgid "Value must be a list of object IDs, not {type}" msgstr "" -#: netbox/extras/models/customfields.py:707 +#: netbox/extras/models/customfields.py:703 #, python-brace-format msgid "Found invalid object ID: {id}" msgstr "" -#: netbox/extras/models/customfields.py:710 +#: netbox/extras/models/customfields.py:706 msgid "Required field cannot be empty." msgstr "" -#: netbox/extras/models/customfields.py:729 +#: netbox/extras/models/customfields.py:725 msgid "Base set of predefined choices (optional)" msgstr "" -#: netbox/extras/models/customfields.py:741 +#: netbox/extras/models/customfields.py:737 msgid "Choices are automatically ordered alphabetically" msgstr "" -#: netbox/extras/models/customfields.py:748 +#: netbox/extras/models/customfields.py:744 msgid "custom field choice set" msgstr "" -#: netbox/extras/models/customfields.py:749 +#: netbox/extras/models/customfields.py:745 msgid "custom field choice sets" msgstr "" -#: netbox/extras/models/customfields.py:785 +#: netbox/extras/models/customfields.py:781 msgid "Must define base or extra choices." msgstr "" From 752eb9e0ce26f7166c09d46fff4f1c0b8e649cbf Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 05:12:34 +0000 Subject: [PATCH 5/5] Update source translation strings --- netbox/translations/en/LC_MESSAGES/django.po | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/netbox/translations/en/LC_MESSAGES/django.po b/netbox/translations/en/LC_MESSAGES/django.po index 7a60e6028..5223b9f9c 100644 --- a/netbox/translations/en/LC_MESSAGES/django.po +++ b/netbox/translations/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-13 05:02+0000\n" +"POT-Creation-Date: 2024-06-20 05:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -7686,56 +7686,56 @@ msgstr "" msgid "Date values must be in ISO 8601 format (YYYY-MM-DD)." msgstr "" -#: netbox/extras/models/customfields.py:667 +#: netbox/extras/models/customfields.py:671 msgid "Date and time values must be in ISO 8601 format (YYYY-MM-DD HH:MM:SS)." msgstr "" -#: netbox/extras/models/customfields.py:674 +#: netbox/extras/models/customfields.py:678 #, python-brace-format msgid "Invalid choice ({value}) for choice set {choiceset}." msgstr "" -#: netbox/extras/models/customfields.py:684 +#: netbox/extras/models/customfields.py:688 #, python-brace-format msgid "Invalid choice(s) ({value}) for choice set {choiceset}." msgstr "" -#: netbox/extras/models/customfields.py:693 +#: netbox/extras/models/customfields.py:697 #, python-brace-format msgid "Value must be an object ID, not {type}" msgstr "" -#: netbox/extras/models/customfields.py:699 +#: netbox/extras/models/customfields.py:703 #, python-brace-format msgid "Value must be a list of object IDs, not {type}" msgstr "" -#: netbox/extras/models/customfields.py:703 +#: netbox/extras/models/customfields.py:707 #, python-brace-format msgid "Found invalid object ID: {id}" msgstr "" -#: netbox/extras/models/customfields.py:706 +#: netbox/extras/models/customfields.py:710 msgid "Required field cannot be empty." msgstr "" -#: netbox/extras/models/customfields.py:725 +#: netbox/extras/models/customfields.py:729 msgid "Base set of predefined choices (optional)" msgstr "" -#: netbox/extras/models/customfields.py:737 +#: netbox/extras/models/customfields.py:741 msgid "Choices are automatically ordered alphabetically" msgstr "" -#: netbox/extras/models/customfields.py:744 +#: netbox/extras/models/customfields.py:748 msgid "custom field choice set" msgstr "" -#: netbox/extras/models/customfields.py:745 +#: netbox/extras/models/customfields.py:749 msgid "custom field choice sets" msgstr "" -#: netbox/extras/models/customfields.py:781 +#: netbox/extras/models/customfields.py:785 msgid "Must define base or extra choices." msgstr ""