views:

49

answers:

1

Django-admin is pluralizing a model that I have running as a proxy class.

The normal case here works fine:

class Triviatheme(models.Model):
    [  ... elided ... ]
    class Meta:
        db_table = u'TriviaTheme'
        verbose_name_plural='trivia themes'

But for a main content table, I have a parent model called 'Content', and a proxy class:

class News(Content):
    DTYPE='News'
    class Meta:
        verbose_name_plural='News'
        proxy = True

But with the Meta in Content is still pluralizing 'News' resulting in 'Newss', so its ignoring the verbose_name_plural field, but not the proxy field.

Similarly, overriding the field in the parent class seems to have no effect. What am I missing? Is there a better way of implementing a large table model with a discriminator column?

Note that this is reverse engineering a DB from a different app, so the model is pretty well set and I can't just change the schema.

edit:

I'm on python 2.6 / Django 1.2.1

I'm also using a Manager class to handle the discriminator, but its still not working.

A: 

FWIW I tested this with Django 1.1.1 and Django 1.2.1 and it worked as expected in both cases.

Manoj Govindan