I'm getting some weird things happening in my admin interface.
Fields marked with null=True are failing with no content and I'm
getting repeating lines results in some list pages and not in others.

like:
Alice's Blog
Johannes blog
Alice's Blog
Johannes blog
Alice's Blog
Johannes blog
2 blogs

and:
Test Website
Johannes' Famous Site
Test Website
Johannes' Famous Site
Test Website
Johannes' Famous Site
2 websites

my models are:

class Website(meta.Model):
        user = meta.OneToOneField(User)
        name = meta.CharField('website name', maxlength=50)
        window_title = meta.CharField(maxlength=50, null=True)
        customfoot = meta.CharField(maxlength=50, null=True)
        auto_redirect = meta.BooleanField(default=False)
        disabled = meta.BooleanField(default=False, db_index=True)
        created = meta.DateTimeField(auto_now_add=True)

class Page(meta.Model):
        website = meta.ForeignKey(Website)
        menu_title = meta.SlugField(maxlength=10)
        page_title = meta.CharField(maxlength=50)
        content = meta.TextField('page content', null=True)
        description = meta.TextField(null=True)
        created = meta.DateTimeField(auto_now_add=True)
        updated = meta.DateTimeField(auto_now=True)
        disabled = meta.BooleanField(default=False, db_index=True)

        class META:
                admin = meta.Admin(
                        list_display=('menu_title', 'created', 'updated'),
                        search_fields=('menu_title','content'),
                )

Is this a known problem, or something that's wrong with my model? The
data in the db is fine and I haven't noticed anything else that's
strange. I'm using build 2074.

Any help?

...

Also, the ' character is not getting escaped now (it was before, as it
pasted in with blog names) and causing:

IntegrityError at /admin/blogs/blogs/add/
ERROR: insert or update on table "django_admin_log" violates foreign
key constraint "$2" DETAIL: Key (content_type_id)=(28) is not present
in table "content_types". INSERT INTO "django_admin_log"
("action_time","user_id","content_type_id","object_id","object_repr","action_flag","change_message")
VALUES ('2006-01-20 23:15:54.806513',1,28,'1','Alice''s blog',1,'')

But inserts fine ... this is all very dodgy.


Luke Skibinski Holt

Reply via email to