initial commit
This commit is contained in:
11
student/models.py
Normal file
11
student/models.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
# Create your models here.
|
||||
class Student(models.Model):
|
||||
w_number = models.IntegerField()
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
classes = models.CharField(max_length = 200)
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username.capitalize()
|
||||
Reference in New Issue
Block a user