Skip to content

Django-rest framework 'module' object is not callable #51

@antat2003

Description

@antat2003

I have a model like this
class ProductCategory(models.Model):
name = models.CharField(max_length=150, primary_key = True)
description = models.TextField()

audit_log = AuditLog()

my serializer:

class ProductCategorySerializer(serializers.ModelSerializer):
class Meta:
model = ProductCategory

I got this error
TypeError at /api/productcategoty/
'module' object is not callable

Do you know how to implement AuditLog() to work with rest framework?
Thank you
An

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions