Hi, I'd like to ask how you amend your field names.
I have encountered two "problems" I'd like to ask about.
A. Is there a function to quickly re-name model-fields in bulk?
B. How do you re-name a foreign-key?
I assume that 95% of all users change the field names, as the python convention is different to that of e.g. json, and that internal model representation is normally not very user friendly.
I have tried on my own, but soon end up in a conclusion that I am totally wrong about the task, when starting to work with completely re-writing over 100 field names within the serializer when I just want to rename it for the user.
e.g. if I have an internal model fieldname called RTF_44534_PB =
models.DecimalField(decimal_places=2, max_digits=5, blank=True, null=True)
I re-write it as
Length = serializers.DecimalField(decimal_places=2, max_digits=5,If it would exist a serializer field on the form:, Length = serializers.ModelField(RTF_44534_PB), would considerable speed up everything and minimize any potential mismatches.
This manual method works on all fields but when I come to a foreginkey, I cannot find how to re-name that field in a similar way. How do yo re-name a foreign key?
Many thanks