Worked out API's

This commit is contained in:
Lucas
2024-06-09 21:34:59 -07:00
parent 3fd16b4833
commit fc723d93fc
70 changed files with 337 additions and 2 deletions

View File

@@ -1,11 +1,12 @@
from django.db import models
from django.contrib.auth.models import User
from classes.models import Classes
# 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)
classes = models.ManyToManyField(Classes)
def __str__(self):
return self.user.username.capitalize()