Repository: wagtail/wagtail
File: wagtail/admin/viewsets/model.py (Python)

Code before:

    def __init__(self, name=None, **kwargs):
        super().__init__(name=name, **kwargs)
        if not self.model:
            raise ImproperlyConfigured(
                "ModelViewSet %r must define a `model` attribute or pass a `model` argument"
                % self
            )

        self.model_opts = self.model._meta
        self.app_label = self.model_opts.app_label
        self.model_name = self.model_opts.model_name

        # Auto-detect sort_order_field from the model, e.g. from Orderable mixin
        if self.sort_order_field is self.UNDEFINED and hasattr(
            self.model, "sort_order_field"
        ):
            self.sort_order_field = self.model.sort_order_field

    @property
    def permission_policy(self):
        return ModelPermissionPolicy(self.model)

    @property
    def url_converter(self):
        """What will be used to convert pks in urls"""
        if isinstance(self.model_opts.pk, models.UUIDField):
            return "uuid"
        if isinstance(self.model_opts.pk, models.IntegerField):
            return "int"
        # Default to string if unknown
        return "str"

    @cached_property
    def name(self):
        """
        Viewset name, to use as the URL prefix and namespace.
        Defaults to the :attr:`~django.db.models.Options.model_name`.
        """
        return self.model_name

    @cached_property
    def reorder_view_enabled(self):
        return self.sort_order_field not in {self.UNDEFINED, None}

    def get_common_view_kwargs(self, **kwargs):
        view_kwargs = super().get_common_view_kwargs(
            **{
                "model": self.model,
                "permission_policy": self.permission_policy,
                "index_url_name": self.get_url_name("index"),

Review comment (suggestion):
We should probably lean towards Django's naming of "path converter"

```suggestion
    def pk_path_converter(self):
        """
        :ref:`Path converter <topics/http/urls:path converters>` to use for
        the model's primary key in URL patterns.

        .. versionadded:: 7.3
           The ``pk_path_converter`` property was added.
        """
```

Code after:

    def __init__(self, name=None, **kwargs):
        super().__init__(name=name, **kwargs)
        if not self.model:
            raise ImproperlyConfigured(
                "ModelViewSet %r must define a `model` attribute or pass a `model` argument"
                % self
            )

        self.model_opts = self.model._meta
        self.app_label = self.model_opts.app_label
        self.model_name = self.model_opts.model_name

        # Auto-detect sort_order_field from the model, e.g. from Orderable mixin
        if self.sort_order_field is self.UNDEFINED and hasattr(
            self.model, "sort_order_field"
        ):
            self.sort_order_field = self.model.sort_order_field

    @property
    def permission_policy(self):
        return ModelPermissionPolicy(self.model)

    @cached_property
    def pk_path_converter(self):
        """
        :ref:`Path converter <topics/http/urls:path converters>` to use for
        the model's primary key in URL patterns. Defaults to ``"int"`` for
        ``IntegerField``, ``"uuid"`` for ``UUIDField``, and ``"str"`` for all
        other types.

        .. versionadded:: 7.3
           The ``pk_path_converter`` property was added.
        """
        if isinstance(self.model_opts.pk, models.UUIDField):
            return "uuid"
        if isinstance(self.model_opts.pk, models.IntegerField):
            return "int"
        # Default to string if unknown
        return "str"

    @cached_property
    def name(self):
        """
        Viewset name, to use as the URL prefix and namespace.
        Defaults to the :attr:`~django.db.models.Options.model_name`.
        """
        return self.model_name

    @cached_property
    def reorder_view_enabled(self):