portier/restream/models.py

19 lines
464 B
Python

from django.db import models
# Create your models here.
from rtmp.models import Stream
class RestreamConfig(models.Model):
stream = models.ForeignKey(Stream, on_delete=models.CASCADE)
target = models.CharField(max_length=500)
name = models.CharField(max_length=100)
active = models.BooleanField()
def class_name(self):
return self.__class__.__name__
def __str__(self):
return '{} to {}'.format(self.stream, self.name)