37 lines
742 B
Python
37 lines
742 B
Python
from django.db import models
|
|
from django.contrib.auth.models import Group
|
|
|
|
|
|
class Category(models.Model):
|
|
name = models.CharField(
|
|
max_length=255,
|
|
name="Nom de la catégorie"
|
|
)
|
|
|
|
|
|
class School(models.Model):
|
|
name = models.CharField(
|
|
max_length=255
|
|
)
|
|
|
|
def __str__(self):
|
|
return self.name
|
|
|
|
class Video(models.Model):
|
|
name = models.CharField(max_length=255)
|
|
|
|
|
|
class Content(models.Model):
|
|
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,
|
|
)
|