Ok, so I posted a question recently regarding an error when adding a ManyToManyField
The Models are the ones below
class MagicType(models.Model):
name = models.CharField(max_length=155)
parent = models.ForeignKey('self', null=True, blank=True)
class Spell(models.Model):
name = models.CharField(max_length=250, db_index=True)
magic_words = models.CharField(max_length=250, db_index=True)
magic_types = models.ManyToManyField(MagicType)
This is the error I get when migrating with django-evolution:
AttributeError: 'ManyToManyField' object has no attribute '_get_m2m_column_name'
So, is there a way of manually setting a ManyToManyField without specifying it within the two models? let's say with a model like this
class SpellToMagicType(models.Model):
magic_type = models.ForeignKey(MagicType)
spell = models.ForeignKey(Spell)
but how would I go on about using this within Django's ORM?
Help would be very much appreciated. Thanks!