RCRam...@gldd.com
unread,Oct 24, 2005, 7:37:12 AM10/24/05Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
I have a weblog app (definition of the Post object below). Everything looks OK, but when I go to add or edit a post, the admin app will not let me. I make my changes (or fill in the fields for a new post). The server reports that it is POSTing the HTML:
[24/Oct/2005 06:23:01] "POST /admin/weblog/posts/add/ HTTP/1.1" 200 4845
But then admin comes back with the same edit screen saying 'Please correct the error below.' across the top, but not specifying the error. I tried saving a post with intentional errors (no title or non-unique title), and the admin correctly notified me of the error.
Any idea where I should look or why this message is appearing?
Robert
class Post(meta.Model):
pub_date = meta.DateTimeField(default=meta.LazyDate())
author = meta.ForeignKey(Author)
title = meta.CharField(maxlength=50, unique=True)
text = meta.TextField()
category = meta.ForeignKey(Category)
slug = meta.SlugField(prepopulate_from=("title",))
class META:
admin = meta.Admin(
fields = (
(None, {'fields': ('title', 'pub_date', 'author')}),
('Contents', {'fields': ('category', 'text')}),
),
list_display = ('title', 'author', 'pub_date', 'category'),
list_filter = ['pub_date', 'author', 'category'],
date_hierarchy = 'pub_date',
)
def __repr__(self):
return self.slug