django-tree
django-tree copied to clipboard
NotImplementedError: django-tree is only for PostgreSQL for now.
This is my models.py:
class Group(models.Model, TreeModelMixin):
group_id = models.AutoField(primary_key=True)
groupParent_id = models.ForeignKey('self', blank=True, null=True, related_name='parent', on_delete=models.CASCADE)
group_name = models.CharField(max_length=100, null=False, blank=False, unique=True)
path = PathField()
def __str__(self):
return '{}'.format(self.group_name)
class Meta:
ordering = ('path',)
and this is file in migrations directory: file name :migrationTree
from django.db import migrations from tree.operations import CreateTreeTrigger
class Migration(migrations.Migration): dependencies = [ ('tree', '0002_auto_20190610_0957'), ]
operations = [
CreateTreeTrigger('importXLS.Group'),
]
How can I resolve this as when I try do makemigrations I have the error in title up
It seems it does not work with sqlite3 ?
Indeed. Ideally it would be great to have equivalent implementations for SQLite & MySQL, so that django-tree is aligned with Django and could be used in other projects such as Wagtail, but at the same time the effort is quite big and I have no interest in building these implementations: I only use PostgreSQL (like a large part of djangonauts) and had only been paid for the PostgreSQL implementation :joy: