Commit 55ad5cac authored by Rau Layug's avatar Rau Layug

Merge branch 'layug/calendar' into 'master'

Created calendarapp model, added admin view for the calendarapp, and updated...

See merge request !1
parents e6b01d65 50919849
from django.contrib import admin
from .models import Event
# Register your models here.
class EventAdmin(admin.ModelAdmin):
model = Event
list_display = ('target_date', 'activity', 'estimated_hours')
admin.site.register(Event, EventAdmin)
\ No newline at end of file
# Generated by Django 4.0.3 on 2022-03-17 15:19
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Event',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('target_date', models.DateField()),
('activity', models.CharField(max_length=150)),
('estimated_hours', models.FloatField()),
],
),
]
from django.db import models
# Create your models here.
class Event(models.Model):
target_date = models.DateField()
activity = models.CharField(max_length=150)
estimated_hours = models.FloatField()
def __str__(self):
return '{} with {} hours duration on {} '.format(self.activity, self.estimated_hours, self.target_date)
\ No newline at end of file
......@@ -44,7 +44,7 @@ INSTALLED_APPS = [
'announcementboard',
'forum',
'assignments',
'calendar'
'calendarapp'
]
MIDDLEWARE = [
......
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