I am wanting to add the ability for registed users to be able to add
comments to a story. I was reading that I need to 'update your
database with the comments model'. I'm not sure what this means? Do
I just need to import a specific module in my models.py file or do I
need to create a new class? And if I need to create a new class what
fields do I need? I have the following post class currently
class Post(models.Model):
title = models.CharField(maxlength=200)
slug = models.SlugField(prepopulate_from=('title',))
pub_date = models.DateTimeField('Date published')
body = models.TextField()
author = models.ForeignKey(User)
enable_comments = models.BooleanField(default=True)
def __str__(self,):
return self.title
class Admin:
list_display = ('title','pub_date','enable_comments')
search_fields = ('title', 'slug', 'body')
list_filter = ('pub_date', 'enable_comments')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---