mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2026-02-04 15:34:45 +01:00
Add choices on Song.state
This commit is contained in:
@ -36,7 +36,13 @@ class PlaylistSong(models.Model):
|
||||
# 1: Playing.
|
||||
# 2: Played.
|
||||
# 3: Cancelled.
|
||||
state = models.IntegerField(default=0, db_index=True)
|
||||
STATECHOICE = (
|
||||
(0, 'Queued'),
|
||||
(1, 'Playing'),
|
||||
(2, 'Played'),
|
||||
(3, 'Cancelled'),
|
||||
)
|
||||
state = models.IntegerField(default=0, db_index=True, choices=STATECHOICE)
|
||||
|
||||
def move_up(self):
|
||||
other_song = PlaylistSong.objects.filter(playlist=self.playlist, id__lt=self.id)\
|
||||
|
||||
Reference in New Issue
Block a user