On Sun, Feb 6, 2011 at 11:33 AM, Bobby Roberts <tchend...@gmail.com> wrote:

> if i have a model name "Facility", django adds an "s" to it in /admin
> and it shows up as Facilitys.  How can I make it show up as
> "Facilities" in /admin?
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
http://docs.djangoproject.com/en/dev/topics/db/models/ shows this:
Meta 
optionsĀ¶<http://docs.djangoproject.com/en/dev/topics/db/models/#meta-options>

Give your model metadata by using an inner class Meta, like so:

class Ox(models.Model):
    horn_length = models.IntegerField()

    class Meta:
        ordering = ["horn_length"]
        verbose_name_plural = "oxen"



-- 
Joel Goldstick

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to