Commit b9e6a7ba authored by Julia Anishka's avatar Julia Anishka

created announcement model

parent 4005cf20
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class AnnouncementboardConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'announcementboard'
from django.db import models
from dashboard.models import WidgetUser
class Announcement(models.Model):
title = models.CharField(max_length = 50)
body = models.TextField(max_length = 700, null = True, blank = True)
author = models.ForeignKey(WidgetUser, on_delete = models.CASCADE)
pub_datetime = models.DateTimeField('publication date and time')
def __str__(self):
return self.title
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