We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Single in on one plurality (my preference would be plural) for all many to many fields. Example:
PolicyRule has its many to many fields in singular, while Policy has them in plural.
PolicyRule
Policy
class PolicyRule(PrimaryModel): (...) source_user = models.ManyToManyField(to=UserObject, through="SrcUserM2M", related_name="policy_rules") source_user_group = models.ManyToManyField( to=UserObjectGroup, through="SrcUserGroupM2M", related_name="policy_rules" ) source_address = models.ManyToManyField(to=AddressObject, through="SrcAddrM2M", related_name="source_policy_rules") source_address_group = models.ManyToManyField( to=AddressObjectGroup, through="SrcAddrGroupM2M", related_name="source_policy_rules" ) source_zone = models.ForeignKey( to=Zone, null=True, blank=True, on_delete=models.SET_NULL, related_name="source_policy_rules" ) destination_address = models.ManyToManyField( to=AddressObject, through="DestAddrM2M", related_name="destination_policy_rules" ) destination_address_group = models.ManyToManyField( to=AddressObjectGroup, through="DestAddrGroupM2M", related_name="destination_policy_rules" ) destination_zone = models.ForeignKey( to=Zone, on_delete=models.SET_NULL, null=True, blank=True, related_name="destination_policy_rules" ) service = models.ManyToManyField(to=ServiceObject, through="SvcM2M", related_name="policy_rules") service_group = models.ManyToManyField(to=ServiceObjectGroup, through="SvcGroupM2M", related_name="policy_rules")
class Policy(PrimaryModel): (...) policy_rules = models.ManyToManyField(to=PolicyRule, through="PolicyRuleM2M", related_name="policies") assigned_devices = models.ManyToManyField( to="dcim.Device", through="PolicyDeviceM2M", related_name="firewall_policies" ) assigned_dynamic_groups = models.ManyToManyField( to="extras.DynamicGroup", through="PolicyDynamicGroupM2M", related_name="firewall_policies" )
Greater level of intuition for field naming.
The text was updated successfully, but these errors were encountered:
Resolved by #80
Sorry, something went wrong.
whitej6
No branches or pull requests
Environment
Proposed Functionality
Single in on one plurality (my preference would be plural) for all many to many fields. Example:
PolicyRule
has its many to many fields in singular, whilePolicy
has them in plural.Use Case
Greater level of intuition for field naming.
The text was updated successfully, but these errors were encountered: