blob: 9c17a7a63aa9b739880f5f32ed4efa0818a61aed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
from django.db import models
from django.contrib.auth.models import User
class Video(models.Model):
"""Videos to be uploaded.."""
video_name = models.CharField(max_length=128)
video_file = models.FileField(upload_to="videos")
video_descriotion = models.TextField()
class Module(models.Model):
name = models.CharField(max_length=128)
description = models.TextField()
vidio_list = models.ManyToManyField(Video)
class Profile(models.Model):
"""User Profile describes data/information about regirstered user."""
user = models.OneToOneField(User)
roll_number = models.CharField(max_length=20)
institute = models.CharField(max_length=128)
department = models.CharField(max_length=64)
position = models.CharField(max_length=64)
|