2018-01-14 12:19:11 +00:00
|
|
|
from django.db import models
|
2018-01-14 18:05:53 +00:00
|
|
|
from django.contrib.auth.models import Group
|
2018-01-14 12:19:11 +00:00
|
|
|
|
2018-01-14 18:05:53 +00:00
|
|
|
|
|
|
|
class Category(models.Model):
|
2018-01-22 13:03:25 +00:00
|
|
|
"""Une catégorie de contenu."""
|
2018-01-14 18:05:53 +00:00
|
|
|
name = models.CharField(
|
|
|
|
max_length=255,
|
|
|
|
name="Nom de la catégorie"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class Content(models.Model):
|
2018-01-22 13:03:25 +00:00
|
|
|
"""Un contenu du site (vidéo)."""
|
2018-01-14 18:05:53 +00:00
|
|
|
name = models.CharField(
|
|
|
|
max_length=255,
|
|
|
|
name="Nom du contenu"
|
|
|
|
)
|
|
|
|
group_owner = models.ForeignKey(
|
|
|
|
Group,
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
editable=False,
|
|
|
|
)
|
|
|
|
content_url = models.URLField(
|
|
|
|
name='URL du contenu',
|
|
|
|
editable=False,
|
|
|
|
)
|