New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage RESTfull API #425
Comments
Since the model itself is registered, any usage should inherit the EAV fields. Have any code or anything to share? |
This is my patterbn model : class Pattern(models.Model): His advanced registration : class PatternEavConfig(EavConfig):
This the pattern serializer: class PatternPostSerializer(serializers.ModelSerializer):
The attributes serializer : class AttributeSerializer(serializers.ModelSerializer): POST example: Thanks a lot |
Thanks for sharing as that helps provide some context. One thing to note, you didn't specify what the actual error message/problem you were having, so I'm going to have guess some. Focusing on the serializer, it seems like you're trying to manually create a I would say there's 2 paths to take:
Here's how you could do it based on your code:
|
Thanks a lot for your help ! It works fine. I had no error, just no new attribute for my entity pattern. |
Hello,
I'm trying to use your module with the django rest framework but when I'm creating my entity from a serializer I loose the EAV fields.
Is there any way I can make it work?
Everything works fine from the admin.
thanks for your help
The text was updated successfully, but these errors were encountered: