Posts by Thaís Barras • 11 points
2 posts
-
1
votes2
answers62
viewsA: How to generate auto increment field, in Django models, that is not PK, and that depends on information from another field that is FK?
I decided as follows, taking advantage of the help of friend Pablo: class Licitacao(models.Model): modality = models.Foreignkey(Modality, on_delete=models.CASCADE) licitation =…
-
0
votes2
answers62
viewsQ: How to generate auto increment field, in Django models, that is not PK, and that depends on information from another field that is FK?
I’m developing an application in Django that has two models, Modality and Bidding. The Bidding has a FK field (models.Foreingkey), which pulls the Modality. I would like this field to generate an…