def build_url_field(self, field_name, model_class):
        field_class = self.serializer_url_field
        app_label = getattr(self.Meta, 'app_label', model_class._meta.app_label)
        model_name = getattr(self.Meta, 'model_name', model_class._meta.object_name.lower())

        # Override user things
        if model_name in ('user', 'group', 'permission'):
            app_label = 'users'
        field_kwargs = {
            'view_name': 'api:%s:%s-detail' % (app_label, model_name),
        }

        return field_class, field_kwargs
Provides a command-line interface to numpy2stl
dataset/ETHPy150Open stackdio/stackdio/stackdio/core/serializers.py/StackdioHyperlinkedModelSerializer.build_url_field--crossover with--dataset/ETHPy150Open thearn/stl_tools/stl_tools/image2stl.py/image2stl