list_filter not showing up in admin
Hi everyone,
I am quite new to delevoping with django and I am trying to setup a
simple blog app.
I wanted to use a "list_filter" in the admin but it is somehow not
showing up at all...
I am using django 1.3 and python 2.7.1. (The models are listed
below...)
Does anyone have a suggestion how to make it work?
Thank you for help in advance!
The model:
class Post(models.Model):
author = models.ForeignKey(User, related_name='posts')
title = models.CharField(max_length=255)
body = models.TextField()
pub_date = models.DateTimeField(auto_now_add=True)
edit_date = models.DateTimeField(auto_now=True)
is_public = models.BooleanField('public', default=False)
class Meta:
order_with_respect_to = 'author'
get_latest_by = 'pub_date'
ordering = ['-pub_date']
def __unicode__(self):
return self.title
The admin model:
class PostAdmin(admin.ModelAdmin):
readonly_fields = ['pub_date', 'edit_date']
fieldsets = [
(None, {'fields': ['author', 'title',
'body', 'is_public']}),
('Date information', {'fields': ['pub_date',
'edit_date']})
]
list_display = ['title', 'author', 'pub_date']
list_filer = ['is_public']
ordering = ['-pub_date']
search_fields = ['title']
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home