Removed superfluous mptt requirement
This commit is contained in:
parent
944135e752
commit
8821a1bb43
|
@ -57,7 +57,6 @@ THIRD_PARTY_APPS = (
|
||||||
'taggit',
|
'taggit',
|
||||||
'rest_auth',
|
'rest_auth',
|
||||||
'rest_auth.registration',
|
'rest_auth.registration',
|
||||||
'mptt',
|
|
||||||
'dynamic_preferences',
|
'dynamic_preferences',
|
||||||
'django_filters',
|
'django_filters',
|
||||||
'cacheops',
|
'cacheops',
|
||||||
|
|
|
@ -4,7 +4,6 @@ from __future__ import unicode_literals
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
import django.utils.timezone
|
import django.utils.timezone
|
||||||
import mptt.fields
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -34,7 +33,7 @@ class Migration(migrations.Migration):
|
||||||
('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
|
('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
|
||||||
('position', models.PositiveIntegerField(db_index=True, editable=False)),
|
('position', models.PositiveIntegerField(db_index=True, editable=False)),
|
||||||
('playlist', models.ForeignKey(to='playlists.Playlist', related_name='playlist_tracks', on_delete=models.CASCADE)),
|
('playlist', models.ForeignKey(to='playlists.Playlist', related_name='playlist_tracks', on_delete=models.CASCADE)),
|
||||||
('previous', mptt.fields.TreeOneToOneField(null=True, to='playlists.PlaylistTrack', related_name='next', blank=True, on_delete=models.CASCADE)),
|
('previous', models.OneToOneField(null=True, to='playlists.PlaylistTrack', related_name='next', blank=True, on_delete=models.CASCADE)),
|
||||||
('track', models.ForeignKey(to='music.Track', related_name='playlist_tracks', on_delete=models.CASCADE)),
|
('track', models.ForeignKey(to='music.Track', related_name='playlist_tracks', on_delete=models.CASCADE)),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
from mptt.models import MPTTModel, TreeOneToOneField
|
|
||||||
|
|
||||||
from funkwhale_api.common import fields
|
from funkwhale_api.common import fields
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,18 +26,10 @@ class PlaylistTrack(MPTTModel):
|
||||||
'music.Track',
|
'music.Track',
|
||||||
related_name='playlist_tracks',
|
related_name='playlist_tracks',
|
||||||
on_delete=models.CASCADE)
|
on_delete=models.CASCADE)
|
||||||
previous = TreeOneToOneField(
|
index = models.PositiveIntegerField(null=True)
|
||||||
'self',
|
|
||||||
blank=True,
|
|
||||||
null=True,
|
|
||||||
related_name='next',
|
|
||||||
on_delete=models.CASCADE)
|
|
||||||
playlist = models.ForeignKey(
|
playlist = models.ForeignKey(
|
||||||
Playlist, related_name='playlist_tracks', on_delete=models.CASCADE)
|
Playlist, related_name='playlist_tracks', on_delete=models.CASCADE)
|
||||||
|
|
||||||
class MPTTMeta:
|
|
||||||
level_attr = 'position'
|
|
||||||
parent_attr = 'previous'
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('-playlist', 'position')
|
ordering = ('-playlist', 'index')
|
||||||
|
unique_together = ('playlist', 'index')
|
||||||
|
|
|
@ -33,7 +33,6 @@ musicbrainzngs==0.6
|
||||||
youtube_dl>=2017.12.14
|
youtube_dl>=2017.12.14
|
||||||
djangorestframework>=3.7,<3.8
|
djangorestframework>=3.7,<3.8
|
||||||
djangorestframework-jwt>=1.11,<1.12
|
djangorestframework-jwt>=1.11,<1.12
|
||||||
django-mptt>=0.9,<0.10
|
|
||||||
google-api-python-client>=1.6,<1.7
|
google-api-python-client>=1.6,<1.7
|
||||||
arrow>=0.12,<0.13
|
arrow>=0.12,<0.13
|
||||||
persisting-theory>=0.2,<0.3
|
persisting-theory>=0.2,<0.3
|
||||||
|
|
Loading…
Reference in New Issue