Skip to content

Commit

Permalink
Merge branch 'dev' into test-site-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Jul 12, 2024
2 parents f887367 + 918f7e4 commit 0321690
Show file tree
Hide file tree
Showing 17 changed files with 3,811 additions and 549 deletions.
6 changes: 0 additions & 6 deletions seshat/apps/seshat_api/admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
from django.contrib import admin

from .models import Track, Album

admin.site.register(Track)
admin.site.register(Album)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.0.3 on 2024-06-20 19:25

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('seshat_api', '0001_initial'),
]

operations = [
migrations.AlterUniqueTogether(
name='track',
unique_together=None,
),
migrations.RemoveField(
model_name='track',
name='album',
),
migrations.DeleteModel(
name='Album',
),
migrations.DeleteModel(
name='Track',
),
]
46 changes: 0 additions & 46 deletions seshat/apps/seshat_api/models.py
Original file line number Diff line number Diff line change
@@ -1,46 +0,0 @@
from django.db import models


class Album(models.Model):
"""
:private:
:noindex:
Note:
TODO
This model is used to store information about an album.
It does not seem to belong to the codebase. Remove it?
"""
album_name = models.CharField(max_length=100)
artist = models.CharField(max_length=100)


class Track(models.Model):
"""
:private:
:noindex:
Note:
TODO
This model is used to store information about tracks in an album.
It does not seem to belong to the codebase. Remove it?
"""
album = models.ForeignKey(
Album, related_name='tracks', on_delete=models.CASCADE)
order = models.IntegerField()
title = models.CharField(max_length=100)
duration = models.IntegerField()

class Meta:
"""
:noindex:
"""
unique_together = ['album', 'order']
ordering = ['order']

def __str__(self):
return '%d: %s' % (self.order, self.title)
Loading

0 comments on commit 0321690

Please sign in to comment.