Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Maxence Bothorel
funkwhale
Commits
8821a1bb
Verified
Commit
8821a1bb
authored
Mar 19, 2018
by
Eliot Berriot
Browse files
Removed superfluous mptt requirement
parent
944135e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
api/config/settings/common.py
View file @
8821a1bb
...
...
@@ -57,7 +57,6 @@ THIRD_PARTY_APPS = (
'taggit'
,
'rest_auth'
,
'rest_auth.registration'
,
'mptt'
,
'dynamic_preferences'
,
'django_filters'
,
'cacheops'
,
...
...
api/funkwhale_api/playlists/migrations/0001_initial.py
View file @
8821a1bb
...
...
@@ -4,7 +4,6 @@ from __future__ import unicode_literals
from
django.db
import
migrations
,
models
from
django.conf
import
settings
import
django.utils.timezone
import
mptt.fields
class
Migration
(
migrations
.
Migration
):
...
...
@@ -34,7 +33,7 @@ class Migration(migrations.Migration):
(
'tree_id'
,
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
)),
(
'previous'
,
m
ptt
.
fi
el
d
s
.
Tree
OneToOneField
(
null
=
True
,
to
=
'playlists.PlaylistTrack'
,
related_name
=
'next'
,
blank
=
True
,
on_delete
=
models
.
CASCADE
)),
(
'previous'
,
m
od
els
.
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
)),
],
options
=
{
...
...
api/funkwhale_api/playlists/models.py
View file @
8821a1bb
from
django.db
import
models
from
django.utils
import
timezone
from
mptt.models
import
MPTTModel
,
TreeOneToOneField
from
funkwhale_api.common
import
fields
...
...
@@ -28,18 +26,10 @@ class PlaylistTrack(MPTTModel):
'music.Track'
,
related_name
=
'playlist_tracks'
,
on_delete
=
models
.
CASCADE
)
previous
=
TreeOneToOneField
(
'self'
,
blank
=
True
,
null
=
True
,
related_name
=
'next'
,
on_delete
=
models
.
CASCADE
)
index
=
models
.
PositiveIntegerField
(
null
=
True
)
playlist
=
models
.
ForeignKey
(
Playlist
,
related_name
=
'playlist_tracks'
,
on_delete
=
models
.
CASCADE
)
class
MPTTMeta
:
level_attr
=
'position'
parent_attr
=
'previous'
class
Meta
:
ordering
=
(
'-playlist'
,
'position'
)
ordering
=
(
'-playlist'
,
'index'
)
unique_together
=
(
'playlist'
,
'index'
)
api/requirements/base.txt
View file @
8821a1bb
...
...
@@ -33,7 +33,6 @@ musicbrainzngs==0.6
youtube_dl>=2017.12.14
djangorestframework>=3.7,<3.8
djangorestframework-jwt>=1.11,<1.12
django-mptt>=0.9,<0.10
google-api-python-client>=1.6,<1.7
arrow>=0.12,<0.13
persisting-theory>=0.2,<0.3
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment