Commit 7998a34b authored by Emmanuel Linus T. Evangelista's avatar Emmanuel Linus T. Evangelista

Merge branch 'evangelista/forum' into 'master'

Create Post model, configured admin, migrated database

See merge request !2
parents 4cb2b3f7 4c82a519
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-15 12:29
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(auto_now_add=True, 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", auto_now_add=True)
\ No newline at end of file
No preview for this file type
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