Populated data and inherited design from static

parent e9cb2d17
# Generated by Django 3.2 on 2023-03-06 13:35
# Generated by Django 3.2 on 2023-05-13 03:22
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0001_initial'),
('assignments', '0003_auto_20230429_1712'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 3, 6, 21, 35, 57, 125720)),
model_name='assignment',
name='assignment_name',
field=models.CharField(default='', max_length=50, unique=True, verbose_name='Name'),
),
]
# Generated by Django 3.2 on 2023-03-06 13:36
# Generated by Django 3.2 on 2023-05-13 03:22
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('calendar', '0002_alter_event_target_datetime'),
('forum', '0002_reply_post'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 3, 6, 21, 36, 3, 571433)),
model_name='forumpost',
name='pub_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 5, 13, 11, 22, 5, 434143), editable=False),
),
migrations.AlterField(
model_name='reply',
name='post',
field=models.ForeignKey(default=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='forum.forumpost'),
),
]
......@@ -3,4 +3,4 @@ from django.apps import AppConfig
class WidgetCalendarConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'calendar'
name = 'widget_calendar'
# Generated by Django 3.2 on 2023-03-06 13:34
# Generated by Django 3.2 on 2023-05-13 03:22
import datetime
from django.db import migrations, models
......@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('assignments', '0002_alter_course_course_code'),
('assignments', '0004_alter_assignment_assignment_name'),
]
operations = [
......@@ -26,11 +26,11 @@ class Migration(migrations.Migration):
name='Event',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('target_datetime', models.DateTimeField(default=datetime.datetime(2023, 3, 6, 21, 34, 56, 441115))),
('target_datetime', models.DateTimeField(default=datetime.datetime(2023, 5, 13, 11, 22, 5, 435155))),
('activity', models.CharField(default='', max_length=100)),
('estimated_hours', models.FloatField(default=0)),
('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignments.course')),
('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Venue', to='calendar.location')),
('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='venues', to='widget_calendar.location')),
],
),
]
# Generated by Django 3.2 on 2023-03-06 13:36
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0003_alter_event_target_datetime'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 3, 6, 21, 36, 8, 203438)),
),
]
# Generated by Django 3.2 on 2023-03-06 13:36
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0004_alter_event_target_datetime'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 3, 6, 21, 36, 15, 496092)),
),
]
# Generated by Django 3.2 on 2023-03-06 13:36
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0005_alter_event_target_datetime'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 3, 6, 21, 36, 18, 142763)),
),
]
# Generated by Django 3.2 on 2023-04-29 07:07
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0006_alter_event_target_datetime'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 4, 29, 15, 7, 16, 727183)),
),
]
# Generated by Django 3.2 on 2023-04-29 09:12
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0007_alter_event_target_datetime'),
]
operations = [
migrations.AlterField(
model_name='event',
name='target_datetime',
field=models.DateTimeField(default=datetime.datetime(2023, 4, 29, 17, 12, 10, 865421)),
),
]
......@@ -2,19 +2,22 @@
{% load static %}
{% block title %}Widget's Calendar of Activities{% endblock %}
{% block heading %}Widget's Calendar of Activities{% endblock %}
{% block heading %}
<h1 id="header">Widget's Calendar of Activities </h1>
<div class="separator-bar"></div>
{% endblock %}
{% block content %}
<ul>
{% for event in events %}
<li>
<a href="event.get_absolute_url">
{{ event.activity }}</a>
<li class="object-cell">
<a href="{{ event.get_absolute_url }}">
<span class="object-title">{{ event.activity }} </span> </a>
</li>
{% endfor %}
</ul>
<button onclick="window.location.href='{% url 'calendar:event-add' %}';">
<button onclick="window.location.href='{% url 'calendar:event-add' %}';" class="action-button">
New Activity
</button>
......
......@@ -3,24 +3,20 @@
{% block title %} {{ object.activity }} {% endblock %}
{% block heading %}
<p id="uppercase">
<span id="white">
{{ object.activity }}
</span>
</p>
<h1 class="subheader"> {{ object.activity }} </h1>
{% endblock %}
{% block content %}
<div class="separator-bar"></div>
<div id="main">
{% for event in object.events.all %}
<p id="subheading"> {{ event.target_datetime }} </p>
<p> {{ event.estimated_hours }} </p>
<p> {{ event.course }} </p>
<p> {{ event.estimated_hours }} </p>
<p> {{ event.location }} </p>
<p class="detail-header"> Target Date & Time: {{ event.target_datetime }} </p>
<p class="detail-header"> Estimated Hours: {{ event.estimated_hours }} </p>
<p class="detail-header"> Course: {{ event.course }} </p>
<p class="detail-header"> Location: {{ event.location }} </p>
</div>
<button onclick="window.location.href='{% url 'wcalendar:event-edit' pk=object.pk %}';">
<div class="separator-bar"></div>
<button class="action-button" onclick="window.location.href='{% url 'calendar:event-edit' pk=object.pk %}';">
Edit Activity
</button>
......
......@@ -19,7 +19,7 @@ from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('dashboard.urls', namespace="dashboard")),
path('calendar/', include('widget_calendar.urls', namespace="calendar")),
path('calendar/', include('widget_calendar.urls', namespace="widget_calendar")),
path('assignments/', include('assignments.urls', namespace="assignments")),
path('announcementBoard/', include('announcementBoard.urls', namespace="announcementBoard")),
path('forum/', include('forum.urls', namespace="forum")),
......
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