forked from edwardchalstrey1/seshat
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into test-site-settings
- Loading branch information
Showing
17 changed files
with
3,811 additions
and
549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
27 changes: 27 additions & 0 deletions
27
...pps/seshat_api/migrations/0002_alter_track_unique_together_remove_track_album_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
Oops, something went wrong.