Resolved merging issues

parent 23dc7990
No preview for this file type
# Generated by Django 4.1.7 on 2023-03-06 02:45
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0001_initial'),
('forum', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='reply',
name='post',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='forum.forumpost'),
),
migrations.AlterField(
model_name='forumpost',
name='author',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboard.widgetuser'),
),
migrations.AlterField(
model_name='reply',
name='author',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboard.widgetuser'),
),
]
...@@ -4,7 +4,7 @@ from django.http import HttpResponse ...@@ -4,7 +4,7 @@ from django.http import HttpResponse
from .models import ForumPost, Reply from .models import ForumPost, Reply
# Create your views here. # Create your views here.
def index(request): def index(request):
page_content = "<p>Widget's Forum Posts:<br>" page_content = "<p>Widget's Forum</p> Forum Posts:<br>"
for post in ForumPost.objects.all(): for post in ForumPost.objects.all():
page_content += '{} by {} {} posted {}:<br>{}<br>'.format( page_content += '{} by {} {} posted {}:<br>{}<br>'.format(
...@@ -20,4 +20,3 @@ def index(request): ...@@ -20,4 +20,3 @@ def index(request):
) )
return HttpResponse(page_content) return HttpResponse(page_content)
\ No newline at end of file
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