Dnia 2011-09-10, sob o godzinie 14:50 -0700, Christian Ramsey pisze: > def __unicode__(self) > return 'Name you'd like without the s' > for each model and this will be used instead. That's obviously not what he's after.
> On 10 Sep 2011, at 14:40, Gillwill wrote: > >Apparently the Django default is to append the letter "s" to the end > > of the model name for each listed under a given application on the > > Site Administration page. (It does this in the tutorial sample site > > as > > well - e.g. naming "poll" "polls", etc...) > > > > Is there any way to get rid of that? First, why is that a problem? If you're using localized model names and that's where that doesn't fit - you shouldn't, really. You should use english names for the models and use the i18n infrastructure [1] to translate the names properly. Either way [2] and [3] is what you need. [1] https://docs.djangoproject.com/en/1.3/howto/i18n/ [2] https://docs.djangoproject.com/en/1.3/ref/models/options/#verbose-name [3] https://docs.djangoproject.com/en/1.3/ref/models/options/#verbose-name-plural Cheers, -- Michał (Saviq) Sawicz <mic...@sawicz.net>
signature.asc
Description: This is a digitally signed message part