myyang / django-pb-model

Protobuf mixin for django model
Other
112 stars 22 forks source link

Feature adding all but these fields #36

Open WemyVieira opened 2 years ago

WemyVieira commented 2 years ago

Problem

I've been using ProtoBufMixin for some time but these days I came across a giant .proto and when applying ProtoBufMixin I felt the need to remove a single field, and the question came to me "why describe N fields in pb_2_dj_fields to not include just one if I could simply have a field in ProtoBufMixin that removes that single field"

Description

just add a parameter [pb_2dj ignore fields] that receives a list of fields that should not be used and I assume that pb_2_dj_fields is with all and after getting all the fields from the proto I remove the ones I don't want

myyang commented 2 years ago

cool, could you also update usage in section auto-generation section in README.md ? This make your contribution would be visible and benefit more people 😄