Re: Question regarding organizing models

2021-11-18 Thread Twizerimana Emmanuel
hy yooo i got problem in python quadratic equation in python how to operate delta that is less than 0 using complex function On Sun, Nov 14, 2021 at 9:24 PM Peter of the Norse wrote: > You can put a string with the name of a class that is yet to be defined in > the ForeignKey. > https://docs.dja

Re: Question regarding organizing models

2021-11-14 Thread Peter of the Norse
You can put a string with the name of a class that is yet to be defined in the ForeignKey. https://docs.djangoproject.com/en/3.2/ref/models/fields/#foreignkey In this case you would do created_by_id = models.ForeignKey(

Re: Question regarding organizing models

2021-09-23 Thread bnmng
Are you saying a user can only have one company? If a user can have more than one company then just define the foreign key in company. Then there will automatically be query set attached to each user called company_set. Otherwise, you can define a OneToOneField in User. You can create a thir