BertrandBordage / django-tree

Fast and easy tree structures.
BSD 3-Clause "New" or "Revised" License
88 stars 13 forks source link

NotImplementedError: django-tree is only for PostgreSQL for now. #4

Open PhilippeH1967 opened 5 years ago

PhilippeH1967 commented 5 years ago

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

PhilippeH1967 commented 5 years ago

It seems it does not work with sqlite3 ?

BertrandBordage commented 9 months ago

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: