-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove slug from models #3439
Remove slug from models #3439
Conversation
# Conflicts: # nautobot/core/models/name_color_content_types.py # nautobot/dcim/tests/test_models.py # nautobot/extras/models/groups.py # nautobot/virtualization/models.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Etc. :-)
# Conflicts: # nautobot/circuits/filters.py # nautobot/dcim/tests/test_filters.py # nautobot/extras/filters/__init__.py
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
# Conflicts: # nautobot/core/testing/api.py # nautobot/dcim/tests/test_views.py # nautobot/docs/installation/upgrading-from-nautobot-v1.md
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate to add this to the workload, but I think there are a bunch of HTML templates that also need corresponding updates, for example:
nautobot/circuits/templates/circuits/circuit_retrieve.html: <li><a href="{% url 'circuits:circuit_list' %}?provider={{ object.provider.slug }}">{{ object.provider }}</a></li>
nautobot/circuits/templates/circuits/circuittermination_retrieve.html: <li><a href="{% url 'circuits:circuit_list' %}?provider={{ object.circuit.provider.slug }}">{{ object.circuit.provider }}</a></li>
nautobot/circuits/templates/circuits/circuittype_retrieve.html: <a href="{% url 'circuits:circuit_list' %}?type={{ object.slug }}">{{ circuits_table.rows|length }}</a>
nautobot/circuits/templates/circuits/provider_create.html: {% render_field form.slug %}
nautobot/circuits/templates/circuits/provider_retrieve.html: <a href="{% url 'circuits:circuit_list' %}?provider={{ object.slug }}">{{ circuits_table.rows|length }}</a>
| | `device_type_id` | Enhanced to support primary key UUIDs in addition to slugs | `/dcim/devices/?device_type=<uuid/slug>` | | ||
| | `device_redundancy_group` | Enhanced to support primary key UUIDs in addition to names | `/dcim/devices/?device_redundancy_group=<uuid/name>` | | ||
| | `manufacturer` | Enhanced to support primary key UUIDs in addition to names | `/dcim/devices/?manufacturer=<uuid/name>` | | ||
| | `model` | Enhanced to support primary key UUIDs in addition to slugs | `/dcim/devices/?model=<uuid/slug>` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be names instead of slugs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think Device has model filter anymore, so i removed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, it was replaced by device_type
as documented in the "Removed Filter Fields" table below.
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for seeing this through!
Closes: #2907
What's Changed
TODO