python - Upgrading django from 1.9 to 1.11: reverse accessor clash -


models.py:

class societe(models.model):     ...  class client(societe):     ...     class meta(societe.meta):         proxy = true  class fournisseur(societe):     ...     class meta(societe.meta):         proxy = true  class commande(models.model):     client = models.foreignkey(client, related_name='commandes')     fournisseur = models.foreignkey(fournisseur, related_name='commandes') 

this works in django 1.9, in 1.11, error:

commande.client: (fields.e304) reverse accessor 'commande.client' clashes reverse accessor 'commande.fournisseur'. commande.client: (fields.e305) reverse query name 'commande.client' clashes reverse query name 'commande.fournisseur'. commande.fournisseur: (fields.e304) reverse accessor 'commande.fournisseur' clashes reverse accessor 'commande.client'. commande.fournisseur: (fields.e305) reverse query name 'commande.fournisseur' clashes reverse query name 'commande.client'. 

django seems consider client , fournisseur same model. dont't want change related names, idea how fix problem?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -