created Department and WidgetUser models

parent d054ca46
from django.db import models from django.db import models
# Create your models here. # Created Department model
class Department(models.Model):
dept_name = models.CharField(max_length = 100)
home_unit = models.CharField(max_length = 100)
def __str__(self):
return self.dept_name
# Created WidgetUser model
class WidgetUser(models.Model):
first_name = models.CharField(max_length = 50)
middle_name = models.CharField(max_length = 50)
last_name = models.CharField(max_length = 50)
department = models.CharField(max_length = 50)
def __str__(self):
username = self.first_name + " " + self.middle_name + " " + self.last_name
return username
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment