Fixed final errors and populated widget apps

parent f9b2466a
...@@ -7,11 +7,12 @@ def index(request): ...@@ -7,11 +7,12 @@ def index(request):
return_string = "<p>Widget's Announcement Board</p> <p>Announcements:<br>" return_string = "<p>Widget's Announcement Board</p> <p>Announcements:<br>"
for announcements in Announcement.objects.all(): for announcements in Announcement.objects.all():
announcement_string = '{} by {} {} published {}:<br>{}<br>'.format( announcement_string = '{} by {} {} published {}, {}:<br>{}<br>'.format(
announcements.title, announcements.title,
announcements.author.first_name, announcements.author.first_name,
announcements.author.last_name, announcements.author.last_name,
announcements.pub_datetime.strftime("%m/%d/%Y %I:%M %p"), announcements.pub_datetime.strftime("%m/%d/%Y"),
announcements.pub_datetime.strftime("%I:%M %p"),
announcements.body announcements.body
) )
return_string += announcement_string return_string += announcement_string
......
# Generated by Django 4.1.7 on 2023-03-06 10:49
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('assignments', '0003_alter_assignment_passing_score_and_more'),
('widget_calendar', '0007_alter_event_course'),
]
operations = [
migrations.AlterField(
model_name='event',
name='course',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignments.course'),
),
]
...@@ -24,7 +24,7 @@ def index(request): ...@@ -24,7 +24,7 @@ def index(request):
) )
return_string += event_string return_string += event_string
return_string += '</p>' return_string += '</p>'
html_string = '<html><body>{}</body></html>'.format(return_string) html_string = '<html><body>{}</body></html>'.format(return_string)
return HttpResponse(html_string) return HttpResponse(html_string)
\ No newline at end of file
...@@ -19,8 +19,8 @@ from django.urls import path, include ...@@ -19,8 +19,8 @@ from django.urls import path, include
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('dashboard/', include('dashboard.urls', namespace='dashboard')), path('dashboard/', include('dashboard.urls', namespace='dashboard')),
path('announcement_board/', include('announcement_board.urls', namespace='announcement_board')), path('announcements/', include('announcement_board.urls', namespace='announcement_board')),
path('forum', include('forum.urls', namespace='forum')), path('forum', include('forum.urls', namespace='forum')),
path('widget_calendar/', include('widget_calendar.urls', namespace="widget_calendar")), path('calendar/', include('widget_calendar.urls', namespace="widget_calendar")),
path('assignments/', include('assignments.urls', namespace='assignments')), path('assignments/', include('assignments.urls', namespace='assignments')),
] ]
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