Commit 9d43b3e8 authored by Bryan Carlo Guanlao's avatar Bryan Carlo Guanlao

Merge branch 'guanlao/announcements' to master

parents f7152968 b6c8ed31
from django.contrib import admin
# Register your models here.
from .models import Announcement
class AnnouncementAdmin(admin.ModelAdmin):
model = Announcement
list_display = ('announcement_title', 'pub_date')
admin.site.register(Announcement, AnnouncementAdmin)
......@@ -4,3 +4,4 @@ from django.apps import AppConfig
class AnnouncementsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'announcements'
verbose_name = 'Announcement Board'
# Generated by Django 3.2.12 on 2022-03-22 18:58
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Announcement',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('announcement_title', models.CharField(max_length=50)),
('announcement_body', models.TextField(max_length=500)),
('pub_date', models.DateField(auto_now_add=True)),
],
),
]
from django.db import models
# Create your models here.
class Announcement(models.Model):
announcement_title = models.CharField(max_length=50)
announcement_body = models.TextField(max_length=500)
pub_date = models.DateField(auto_now_add=True)
def __str__(self):
return '{}'.format(self.announcement_title)
......@@ -113,7 +113,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Asia/Manila'
USE_I18N = True
......
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