-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Adds contact tabs #12460
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
Adds contact tabs #12460
Conversation
jeremystretch
left a comment
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 taking this on!
| filterset = filtersets.ContactFilterSet | ||
| table = tables.ContactTable | ||
|
|
||
|
|
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.
Please check that your IDE is not configured to automatically adjust whitespace unrelated to changes being made.
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 ran pycodestyle --ignore=W504,E501 --exclude=node_modules netbox/ and it wanted me to fix these.
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.
That's very strange, as we have the same convention in many other files. I don't get any warnings or errors when running the same command against develop.
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 did revert the changes for whitespace and reran the command and happened again. I'm not sure why this would be different for me.
| @@ -0,0 +1,27 @@ | |||
| {% extends 'generic/object.html' %} | |||
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.
We probably want to reference the default object template at the base template, as we do for the object journal and changelog views. This ensures that any customizations to the page header remain intact across tabs. For instance, if we use the generic object.html base template, we lose the breadcrumbs under the contacts tab:
IMO it's fine to replicate what we do for the other views:
# Default to using "<app>/<model>.html" as the template, if it exists. Otherwise,
# fall back to using base.html.
if self.base_template is None:
self.base_template = f"{model._meta.app_label}/{model._meta.model_name}.html"|
Thanks @abhi1693! |
* adds contact tabs netbox-community#11599 * fixed lint issues * changes as per review * changes as per review * replaces generic object template with base template


Fixes: #11599