Updated formatting and content for models.py

parent 595fb798
from django.db import models
from django.utils import timezone
#from dashboard.models import WidgetUser
Like = 'Like'
Love = 'Love'
Angry = 'Angry'
REACTIONS = ((Like, 'Like'), (Love, 'Love'), (Angry, 'Angry'))
REACTIONS = ((Like, 'Like'),
(Love, 'Love'),
(Angry, 'Angry'))
class Announcement(models.Model):
title = models.CharField(max_length=50)
body = models.TextField(max_length=10000)
author = models.CharField(max_length=100)
#author = models.ForeignKey(WidgetUser, on_delete=models.CASCADE, null=True, blank=True, default=None)
pub_datetime = models.DateTimeField("date published", default=timezone.now, null=True)
def __str__(self):
......
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