# My table shows with a different name in the admin page

**URL:** <https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591>\
**Category:** The Admin\
**Created:** [August 25, 2022, 12:31am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591 "2022-08-25T00:31:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eglz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eglz/32/9467_2.png) [@Eglz](https://forum.djangoproject.com/u/Eglz)\
**Post date:** [August 25, 2022, 12:31am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/1 "2022-08-25T00:31:29Z")

</div>

As stated I have a couple of tables set up like so connected by _locaciones_

`class Locaciones(models.Model):  
nombre = models.CharField(‘Nombre’, max\_length=250)  
direccion = models.CharField(‘Direccion’, max\_length=250)  
mapa = models.URLField  
def **str** (self):  
return self.nombre

class Evento (models.Model):  
artista = models.CharField(‘Artista’, max\_length=250, blank=True, null=True)  
nombre = models.CharField(‘Evento’, max\_length=250, blank=True, null=True)  
fechayhora = models.DateTimeField(‘Fecha’, max\_length=50, blank=True, null=True)  
locacion = models.ForeignKey(Locaciones, blank=True, null=True, on\_delete=models.CASCADE)  
pais = models.CharField(‘Pais’, max\_length=50, blank=True, null=True)  
director = models.CharField(‘Director’, max\_length=50, blank=True, null=True)  
disciplina = models.CharField(‘Disciplina’, max\_length=50, blank=True, null=True)  
duracion = models.CharField(‘Duracion’, max\_length=50, blank=True, null=True)

def **str** (self):  
return self.artista`

the problem is that in the admin area the first class shows up with another s. Instead of being _Locaciones_ reads _Locacioness_ and when I try and add a location it wont show the actual name given, just shows Locaciones object (3) even when selecting from the drop down menu on the _Eventos_ table, furthermore I tried to solve this by changing the class name from _Locacion_ to _Locaciones_ because I was having the same issue where the admin area adds an _s_ to the class name. This is the first app I code in any capacity so Im out of ideas, a glitch maybe?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 25, 2022, 1:18am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/2 "2022-08-25T01:18:31Z")

</div>

> [@Eglz](#):
>
> the problem is that in the admin area the first class shows up with another s.

This isn’t a problem. This is defined behavior on the model class.  
See [Model Meta options | Django documentation | Django](https://docs.djangoproject.com/en/4.1/ref/models/options/#verbose-name-plural)  
and [The Django admin site | Django documentation | Django](https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#adminsite-methods)

> [@Eglz](#):
>
> I try and add a location it wont show the actual name given, just shows Locaciones object (3)

Again, this is defined behavior. See [Form fields | Django documentation | Django](https://docs.djangoproject.com/en/4.1/ref/forms/fields/#modelchoicefield) among other references.

---

<div class="post-metadata">

**Author:** ![Eglz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eglz/32/9467_2.png) [@Eglz](https://forum.djangoproject.com/u/Eglz)\
**Post date:** [August 25, 2022, 1:54am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/3 "2022-08-25T01:54:07Z")

</div>

Hey thanks for the quick reply, I’m following a tutorial and it looks to me I’ve been writing the exact same models and his tables don’t behave like that, on the +s thing nor the form fields, so I’m confused, is this a different version issue or am I missing something on his tutorial?  
thanks

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 25, 2022, 1:56am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/4 "2022-08-25T01:56:00Z")

</div>

There’s no way I can comment without seeing the tutorial.

---

<div class="post-metadata">

**Author:** ![Eglz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eglz/32/9467_2.png) [@Eglz](https://forum.djangoproject.com/u/Eglz)\
**Post date:** [August 25, 2022, 1:57am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/5 "2022-08-25T01:57:11Z")

</div>

OK, thanks for your time.

---

<div class="post-metadata">

**Author:** ![Spha](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/spha/32/9509_2.png) [@Spha](https://forum.djangoproject.com/u/Spha)\
**Post date:** [August 25, 2022, 10:38am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/6 "2022-08-25T10:38:49Z")

</div>

I don’t know how deeply you want to look into this, but on the surface level…you can re-define the plural name with verbose\_name\_plural=“newname” (ie. look at link posted by Ken), add it to your model as the last option in the list of options/arguments you apply to the model.

---

<div class="post-metadata">

**Author:** ![Eglz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eglz/32/9467_2.png) [@Eglz](https://forum.djangoproject.com/u/Eglz)\
**Post date:** [August 26, 2022, 12:10am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/7 "2022-08-26T00:10:36Z")

</div>

Hey, thanks for taking the time to reply, I was trying to figure where to add the verbose option to my model, I really don’t mind the name, but would like to figure out why would that be necessary as an expected behavior, actually the real issue is that the actual entries are shown as objects on the admin page, so going through the documentation I’m wondering if I need to use the  
_classmodels.LogEntry.object\_id_  
method so I get the name not the _object 1_ string that is being returned; and pardon my ignorance but such model should be placed on the _models.py_ file and should I be importing any file in particular up top?  
Does this sound like it would work?  
thanks

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 26, 2022, 12:43am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/8 "2022-08-26T00:43:19Z")

</div>

The admin is not the only place where the pluralized name is available. So yes, the definition of the pluralized name goes in the `Meta` class of the model. You add an entry in that class for [`verbose_name_plural`](https://docs.djangoproject.com/en/4.1/ref/models/options/#verbose-name-plural).

> [@Eglz](#):
>
> but would like to figure out why would that be necessary as an expected behavior,

Because it’s the defined and designed behavior of how Django works.

Regarding your other question - the links provided to the documentation explain that the select list entries are created by the output of the ` __str__ ` method on the model class. Overriding that method on the related class is the easiest way to change the representation of that class in the admin.

---

<div class="post-metadata">

**Author:** ![Spha](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/spha/32/9509_2.png) [@Spha](https://forum.djangoproject.com/u/Spha)\
**Post date:** [August 26, 2022, 11:24am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/9 "2022-08-26T11:24:01Z")

</div>

It is entirely to do with how you define the field object name. You don’t need to import anything special. If you want a code example can make it, it’s been said: define `def __str__ ` to return exactly what you want, so it wont be returning object(3) or something like that. When you omit ` __str__ ` that’s what happens.

---

<div class="post-metadata">

**Author:** ![Eglz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eglz/32/9467_2.png) [@Eglz](https://forum.djangoproject.com/u/Eglz)\
**Post date:** [August 27, 2022, 5:44am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/10 "2022-08-27T05:44:15Z")

</div>

hi Ken, the necessary expected behavior question was more on the practical ways that may be useful or is it convention to do it, kinda way, wasnt trying to be snotty, I appreciate you taking the time to answer noobs like me, Ill just take some time to work through it, thank you for your replies!

---

<div class="post-metadata">

**Author:** ![Eglz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eglz/32/9467_2.png) [@Eglz](https://forum.djangoproject.com/u/Eglz)\
**Post date:** [August 27, 2022, 5:48am UTC](https://forum.djangoproject.com/t/my-table-shows-with-a-different-name-in-the-admin-page/15591/11 "2022-08-27T05:48:44Z")

</div>

Aight I think I got it, just tweak the return statement to add some constraints? The example was very helpful, thank you for your time
