views:

37

answers:

1

I am new to the Django framework.

On Django's admin index page I'd like to get rid of the "s" at the end of my model names.

Example:

    <div class="module">
     <table summary="Models available in the my application.">
      <caption><a href="" class="section">My application</a></caption>
        <tr>
            <th scope="row"><a href="model/">Model**s**</a></th>            
             <td><a href="model/add/" class="addlink">Add</a></td>
             <td><a href="model/" class="changelink">Change</a></td>         
        </tr>
     </table>
    </div>

I know of a way to do this but I am really looking for the file I should edit. Where is it and what exactly should I do?

I can't seem to pinpoint where it is coming from.

+1  A: 

contrib/admin/templates/admin/index.html - don't edit directly, just copy it to one of your own template directories in admin/. You probably could just override the content block.

However

You probably just want to set verbose_name_plural in your model's Meta class?

class Model(models.Model):
    # fields

    class Meta:
        verbose_name_plural = 'Model'
synic
it's little things like this that would keep me searching for hours. thanks for taking the time to help me out. it's been irking me for more than a minute!
zen
hehe, it happens!
synic
Editing `verbose_name_plural` will probably make things read really weirdly elsewhere ("3 Model saved" instead of ("3 Models saved").
Dominic Rodger