Commit 84b251be authored by Christian Sarabia's avatar Christian Sarabia

Create Post model in forum and add 3 records

parent 127576c1
Volume in drive E is M
Volume Serial Number is 86BB-E1AD
Directory of E:\Christiaaans\College\Sem 4\CSCI 40\Submissions\Lab 1\widget_alipins
03/20/2022 12:03 PM <DIR> .
03/20/2022 12:03 PM <DIR> ..
03/20/2022 11:40 AM 5 .gitignore
03/20/2022 12:03 PM 0 print
03/20/2022 11:40 AM 235 README.md
03/20/2022 11:40 AM <DIR> widget_alipins
3 File(s) 240 bytes
3 Dir(s) 100,111,577,088 bytes free
from django.contrib import admin
# Register your models here.
from .models import Post
admin.site.register(Post)
\ No newline at end of file
# Generated by Django 3.2.12 on 2022-03-20 04:10
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Post',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('post_title', models.CharField(max_length=50)),
('post_body', models.CharField(max_length=500)),
('pub_date', models.DateTimeField(verbose_name='date published')),
],
),
]
from django.db import models
# Create your models here.
class Post(models.Model):
post_title = models.CharField(max_length=50)
post_body = models.CharField(max_length=500)
pub_date = models.DateTimeField("date published")
def __str__(self):
return self.post_title
\ No newline at end of file
......@@ -44,6 +44,7 @@ INSTALLED_APPS = [
'announcements.apps.AnnouncementsConfig',
'assignments.apps.AssignmentsConfig',
'homepage.apps.HomepageConfig',
'forum.apps.ForumConfig'
]
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