Re: one-to-one GenericRelation best practices

2018-06-04 Thread Joseph Mutumi
Hello, May be you want to subclass GenericForeignKey: class GenericOneToOne(GenericForeignKey): many_to_one = False one_to_many = False one_to_one = True Though have not tried it so YMMV. Kind regards On Thu, May 31, 2018 at 8:59 PM, Vitor Barbosa wrote: > Hello! This is my first

one-to-one GenericRelation best practices

2018-05-31 Thread Vitor Barbosa
Hello! This is my first question, so please excuse any mistakes. I'm using django 1.8 (working on migration to 2.0). I need to implement a one-to-one generic relation. To illustrate suppose I have three classes, the first representing and abstract class in a store and the other specific products