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

netutils filters are not available in Django templates, only Jinja2 templates #3290

Closed
glennmatthews opened this issue Feb 10, 2023 · 0 comments · Fixed by #3296
Closed

netutils filters are not available in Django templates, only Jinja2 templates #3290

glennmatthews opened this issue Feb 10, 2023 · 0 comments · Fixed by #3296
Assignees
Labels
type: bug Something isn't working as expected

Comments

@glennmatthews
Copy link
Contributor

Environment

  • Nautobot version (Docker tag too if applicable): 1.5.10

Steps to Reproduce

  1. Embed a netutils filter in a Jinja2 template, such as a CustomField's content: {{ 1000 | bits_to_name }}
  2. It works
  3. Embed a netutils filter in a Django template, such as site.html: {{ 1000 | bits_to_name }}
  4. Template rendering error due to unknown/unrecognized filter

Expected Behavior

#1083 claimed that these filters are supported in both contexts, but only added testing covering their use in Jinja2 templates.

Observed Behavior

It looks like the Django case has been broken all this time.

@glennmatthews glennmatthews added the type: bug Something isn't working as expected label Feb 10, 2023
@glennmatthews glennmatthews self-assigned this Feb 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant