Created
September 4, 2016 10:10
-
-
Save SpencerCooley/3081fe60de68479e11967c0e9bb5fc99 to your computer and use it in GitHub Desktop.
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
from __future__ import unicode_literals | |
from django.db import models | |
from django.contrib.auth.models import User | |
def Follow(models.Model): | |
consumer = models.ForeignKey( | |
'User', | |
on_delete=models.CASCADE, | |
) | |
producer = models.ForeignKey( | |
'User', | |
on_delete=models.CASCADE, | |
) | |
def Content(models.Model): | |
MEDIA_TYPES = ( | |
('photo', 'photo'), | |
('video', 'video'), | |
) | |
user = models.ForeignKey( | |
'User', | |
on_delete=models.CASCADE, | |
) | |
media_type = models.CharField(max_length=1, choices=MEDIA_TYPES) | |
thumb = models.FileField(upload_to='content/', blank=True) | |
message = models.CharField(max_length=200) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment