django-admin2/example/blog/models.py
Andrew Ingram 24bfdab8a6 custom form class support
Also sets framework for adding kwargs to any admin2 view
2013-05-18 16:59:06 +02:00

17 lines
No EOL
334 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