mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-18 23:20:28 +00:00
17 lines
335 B
Python
17 lines
335 B
Python
from django.db import models
|
|
|
|
|
|
class Post(models.Model):
|
|
title = models.CharField(max_length=255)
|
|
body = models.TextField()
|
|
|
|
def __unicode__(self):
|
|
return self.title
|
|
|
|
|
|
class Comment(models.Model):
|
|
post = models.ForeignKey(Post)
|
|
body = models.TextField()
|
|
|
|
def __unicode__(self):
|
|
return self.body
|