Skip to content
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

Use numeric identifiers in all URLs #5873

Closed
jeremystretch opened this issue Feb 25, 2021 · 3 comments
Closed

Use numeric identifiers in all URLs #5873

jeremystretch opened this issue Feb 25, 2021 · 3 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Milestone

Comments

@jeremystretch
Copy link
Member

Proposed Changes

Replace the usage of slugs in URLs with numeric IDs. For example, for a site with the ID 123 and slug 'site-a', the URL would change from

/dcim/sites/site-a/

to

/dcim/sites/123/

All child views (edit, import, etc.) would change as well.

Justification

  1. Provides a more consistent URL pattern, where all objects are identified the same way.
  2. Allows us to phase out the use of slug fields.
@jeremystretch jeremystretch added type: housekeeping Changes to the application which do not directly impact the end user status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Feb 25, 2021
@ryanmerolle
Copy link
Contributor

Having slugs is nice in the url, but plenty of other tools because of consistency and other challenges of trying to keep slugs in the url path. LibreNMS comes to mind here. Most of the benefits of slugs in a url with regards to external integrations can be solved with other means.

If it greatly helps out on the backend & development I think its fair to do.

@jpobeda
Copy link

jpobeda commented Feb 25, 2021

I agree. I like the slugs as well but consistency is always favored.

@jeremystretch
Copy link
Member Author

Well, that was easy. 🙂

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Feb 25, 2021
@jeremystretch jeremystretch added this to the v2.11 milestone Feb 25, 2021
@jeremystretch jeremystretch self-assigned this Feb 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

3 participants