[PR #4327] [CLOSED] 4078: Standardize 'comments' and 'description' Fields #12818

Closed
opened 2025-12-29 22:23:47 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4327
Author: @dstarner
Created: 3/7/2020
Status: Closed

Base: develop-2.8Head: 4078-standardize-description-comments


📄 Description

Fixes: #4078

NOTE: This is merging into the develop-2.8 branch, because this is a 2.8 milestone issue.

Implements a DescriptionModel and CommentModel that standardizes the comments and description fields for any/all models. They are broken out into model extensions / mixins to make it easier to standardize across the application(s) for current and future models.

The migration files were added as <id>_standarize_description_comment_fields.py which I felt was an appropriate name for them.


I initially called them ...Mixins but when being appended to some of the more basic models, this caused a method resolution order exception so I called them Models because MyModel(models.Model, CommentModel) had to become MyModel(CommentModel).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/4327 **Author:** [@dstarner](https://github.com/dstarner) **Created:** 3/7/2020 **Status:** ❌ Closed **Base:** `develop-2.8` ← **Head:** `4078-standardize-description-comments` --- ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #4078 <!-- Please include a summary of the proposed changes below. --> **NOTE**: This is merging into the `develop-2.8` branch, because this is a 2.8 milestone issue. Implements a `DescriptionModel` and `CommentModel` that standardizes the `comments` and `description` fields for any/all models. They are broken out into model extensions / mixins to make it easier to standardize across the application(s) for current *and* future models. The migration files were added as `<id>_standarize_description_comment_fields.py` which I felt was an appropriate name for them. --- I initially called them `...Mixins` but when being appended to some of the more basic models, this caused a [method resolution order exception](https://stackoverflow.com/questions/3003053/metaclass-multiple-inheritance-inconsistency) so I called them `Model`s because `MyModel(models.Model, CommentModel)` had to become `MyModel(CommentModel)`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:23:47 +01:00
adam closed this issue 2025-12-29 22:23:48 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12818