Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db import models
- class Classno(models.Model):
- class_no = models.CharField(max_length=25)
- class UserProfile(models.Model):
- user = models.CharField(max_length=30,blank=True,null=True)
- registration_no = models.CharField(max_length=20,null=True)
- password = models.CharField(max_length=50)
- class_no = models.ForeignKey(Classno,on_delete=models.CASCADE)
- def __str__(self):
- return self.registration_no
Add Comment
Please, Sign In to add comment