1

I'm trying to use django-generic-ratings and django-reviews together. However, they both have models named Vote and both these models defined a field to User with the same related name votes

From this similar question Django: Model name clash , it looks like one way to mitigate this is to change the source code of one app and have it use a different related name. Is there a way to reconcile this related_name clash with code outside these 2 apps (without having to modify either apps' code)?

Community
  • 1
  • 1
lastoneisbearfood
  • 3,955
  • 5
  • 26
  • 25

1 Answers1

1

You can monkey patch either one of the models, but code relying on the related attribute will still break so you might want to fork the repository and change those parts, then use git upstream to keep your package up to date with the master branch in the future

Community
  • 1
  • 1
Hedde van der Heide
  • 21,841
  • 13
  • 71
  • 100