Commit 6072c5f5 authored by Odair Mario's avatar Odair Mario
Browse files

adiciona app degree

parent 4ed2d672
......@@ -43,6 +43,7 @@ INSTALLED_APPS = [
from django.contrib import admin
from .models import Degree
from django.apps import AppConfig
class DegreeConfig(AppConfig):
name = 'degree'
from django.db import models
from django.contrib.auth.models import User
class Degree(models.Model):
name = models.CharField(max_length=40)
code = models.CharField(max_length=40)
manager = models.ForeignKey(User)
def clean_code(self):
if '/' in self.code:
raise ValidationError('Valor inválido: O código não pode conter "/"')
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