You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call the basic retrieve template for it $(MODELNAME)_retrieve (as I assume is best practice due to NautobotUIViewSet using this)
Create an instance of that model
Navigate to the Notes or Changelog tab of that model
Expected Behavior
The tab displays correctly including the rendering of the other tabs.
Observed Behavior
Only the tab content renders, not the other tabs.
Potential fix
Notes
A potential fix for the Notes issue could be here:
-# Default to using "<app>/<model>.html" as the template, if it exists. Otherwise,+# Default to using "<app>/<model>_retrieve.html" as the template, if it exists. Otherwise,# fall back to using base.html.ifself.base_templateisNone:
-self.base_template=f"{model._meta.app_label}/{model._meta.model_name}.html"+self.base_template=f"{model._meta.app_label}/{model._meta.model_name}_retrieve.html"# TODO: This can be removed once an object view has been established for every model.try:
template.loader.get_template(self.base_template)
excepttemplate.TemplateDoesNotExist:
self.base_template="base.html"
Changelog
A potential fix for the Changelog issue could be here:
-# Default to using "<app>/<model>.html" as the template, if it exists. Otherwise,+# Default to using "<app>/<model>_retrieve.html" as the template, if it exists. Otherwise,# fall back to using base.html.ifself.base_templateisNone:
-self.base_template=f"{model._meta.app_label}/{model._meta.model_name}.html"+self.base_template=f"{model._meta.app_label}/{model._meta.model_name}_retrieve.html"# TODO: This can be removed once an object view has been established for every model.try:
template.loader.get_template(self.base_template)
excepttemplate.TemplateDoesNotExist:
self.base_template="base.html"
The text was updated successfully, but these errors were encountered:
We probably need logic to look for both filenames, as any existing views and plugins not using NautobotUIViewSet are likely still using the older <app_label>/<model_name>.html format still.
Environment
postgres:13-alpine
Steps to Reproduce
$(MODELNAME)_retrieve
(as I assume is best practice due toNautobotUIViewSet
using this)Expected Behavior
The tab displays correctly including the rendering of the other tabs.
Observed Behavior
Only the tab content renders, not the other tabs.
Potential fix
Notes
A potential fix for the Notes issue could be here:
Changelog
A potential fix for the Changelog issue could be here:
The text was updated successfully, but these errors were encountered: