Closed masaruduy closed 7 years ago
You're not doing anything wrong: for standardization purposes, the auto label creation from the model runs .lower()
on the model name. If having the caps is important, you can manually specify the label as a third option:
queryList = [
(userType.objects.all(), userTypeSerializer, 'userType'),
....
]
Got it thanks!
On Sun, May 21, 2017 at 12:54 PM, Matt Nishi-Broach < notifications@github.com> wrote:
You're not doing anything wrong: for standardization purposes, the auto label creation from the model runs .lower() on the model name. If having the caps is important, you can manually specify the label as a third option:
queryList = [ (userType.objects.all(), userTypeSerializer, 'userType'), .... ]
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Axiologue/DjangoRestMultipleModels/issues/28#issuecomment-302948703, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAD_vCT-0o_e8ftVdZTZ7X1CkQX_4e5ks5r8GxPgaJpZM4NemcP .
-- -Duy
ex: My model name is called userType but when I use it with the DjangoRestMultipleModels view, I get:
{ "usertype": [ { "id": 1,
Perhaps I'm doing something wrong?