Commit 89f65618 authored by Lance Cedric Tan's avatar Lance Cedric Tan

Created amd migrated models

parent 11a84144
No preview for this file type
No preview for this file type
# Generated by Django 3.2 on 2023-03-05 01:32
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ForumPost',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=100)),
('body', models.TextField()),
('author', models.CharField(max_length=50)),
('pub_datetime', models.DateTimeField()),
],
),
migrations.CreateModel(
name='Reply',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('body', models.TextField()),
('author', models.CharField(max_length=50)),
('pub_datetime', models.DateTimeField()),
],
),
]
from django.db import models from django.db import models
# Create your models here.
class ForumPost(models.Model):
title = models.CharField(max_length=100)
body = models.TextField()
author = models.CharField(max_length=50) #To be updated after Dashboard implementation
pub_datetime = models.DateTimeField()
def __str__(self):
return self.title
class Reply(models.Model):
body = models.TextField()
author = models.CharField(max_length=50) #To be updated after Dashboard implementation
pub_datetime = models.DateTimeField()
\ 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