Skip to content

Fix accessor syntax useage in table column configuration #18834

@jnovinger

Description

@jnovinger

Proposed Changes

We have several at least one django_tables.Table sub-class that uses the . notation to specify related objects. This notation was deprecated in django-tables2 v2.2.0 in favor of using the __ notation.

For example, in circuits.tables.CircuitTerminationTable we define a column provider that uses accessor='circuit.provider'. This will become accessor='circuit__provider'.

--> find . -iname "*.py" | xargs rg "accessor=.*[\'\"].*\."
./circuits/tables/circuits.py
114:        accessor='circuit.provider'

Justification

This will have a couple of positive effects:

  • It's required for the django-tables2 3.0 release, so will ease our upgrade path when the time comes.
  • It will eliminate unnecessary chatter in test output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: duplicateThis issue has already been raisedtype: housekeepingChanges to the application which do not directly impact the end user

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions