Re: Admin Site appending letter "s" to end of each model\table name
I'm a newbie to object-oriented programming too, so I suppose my mindset is still in procedural, SQL and "recordset" modes, and otherwise: my old ways :-) Thanks for that additional info. Good Points.
From: Shawn Milochik <shawn@milochik.com>
To: django-users@googlegroups.com
Sent: Saturday, September 10, 2011 6:12 PM
Subject: Re: Admin Site appending letter "s" to end of each model\table name
To: django-users@googlegroups.com
Sent: Saturday, September 10, 2011 6:12 PM
Subject: Re: Admin Site appending letter "s" to end of each model\table name
It's conventional to name model in the singular by default, such as Movie and Book. You have a 'Movie' model, not a 'Movies' model. It also makes the default in the admin make perfect sense. If you have something that does end in is or the plural doesn't end in S (ox/oxen) then use verbose_name_plural.
If you think about it, a "Movies" doesn't have a "title" and "year_released" and a "rating" -- a "Movie" does.
--
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