gergelypolonkai-web-django/blog/models.py
2013-10-01 21:18:11 +02:00

16 lines
462 B
Python

from django.db import models
from django.contrib.auth.models import User
from taggit.managers import TaggableManager
class Post(models.Model):
user = models.ForeignKey(User)
created_at = models.DateTimeField()
title = models.CharField(max_length = 100)
slug = models.CharField(max_length = 100)
content = models.TextField()
draft = models.BooleanField()
tags = TaggableManager()
def __unicode__(self):
return self.title