class CompanyResource(ModelResource):
    """
    CompanyIds should be unique
    """
CompanyName = fields.CharField(attribute='company_name')
CompanyId = fields.CharField(attribute='company_id', unique=True)
Contact = fields.CharField(attribute='contact')
Email = fields.CharField(attribute='email')
Phone = fields.CharField(attribute='phone')


class Meta:
    queryset = Company.objects.all()
authentication = BasicAuthentication()
authorization = Authorization()
allowed_methods = ['get', 'post']
validation = CustomValidation()
How do I configure Tastypie to treat a field as unique?