Commit 4db77337 authored by Mavrick Jordan Lee's avatar Mavrick Jordan Lee

Created dashboard Django application. Added Department and WidgetUser models.

parent 6d06d3c0
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class DashboardConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'dashboard'
from django.db import models
# Create your models here.
class Department(models.Model):
dept_name = models.CharField(max_length=50, unique=True, null=True)
home_unit = models.CharField(max_length=50, unique=True, null=True)
def __str__(self):
return self.dept_name
class WidgetUser(models.Model):
first_name = models.CharField(max_length=30, unique=True, null=True)
middle_name = models.CharField(max_length=20, unique=True, null=True)
last_name = models.CharField(max_length=20, unique=True, null=True)
user_department = models.ForeignKey(Department, on_delete=models.CASCADE)
def __str__(self):
return self.first_name
from django.test import TestCase
# Create your tests here.
from django.shortcuts import render
# Create your views here.
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