Django inheritance: specify foreign key name -


i'm new django world, , using django rest framework, don't think relevant problem.

i designed database hand , prefer not use django migrations generate it. have convention use name tablename_id foreign key.

my problem when want use inheritance, django tries use name parenttablename_ptr_id instead of parenttablename_id. there way specify ?

here fake code showing wanted result:

class a(models.model):     id = models.autofield(primary_key=true)     name = models.charfield(max_length=255, unique=true) class b(a):     # other stuff     # a_id foreign key a, instead of a_ptr_id 

i hope clear, couldn't find answer elsewhere.

thank in advance response !


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -