Commit 2f2fb374 authored by Brian Guadalupe's avatar Brian Guadalupe

Merge branch 'follow-playlist' into 'master'

Add follower-following relationship

See merge request brian/mymusiclist!16
parents aa3ac8dd fdf8c2e0
......@@ -16,3 +16,7 @@ class MusicEntry(models.Model):
rating = models.DecimalField(max_digits=1, decimal_places=0)
playlist = models.ForeignKey(MusicPlaylist)
song = models.ForeignKey(Song)
class Follows(models.Model):
user = models.ForeignKey(User)
playlist = models.ForeignKey(MusicPlaylist)
\ No newline at end of file
from django.db import models
from django.contrib.auth.models import User
from playlist.models import *
class Tag(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=32)
tag = models.ManyToManyField(MusicEntry)
def __str__(self):
return self.name
class EntryTag(models.Model):
tag = models.ForeignKey(Tag)
music_entry = models.ForeignKey(MusicEntry)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment