Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 525025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:37:44+00:00 2026-05-13T08:37:44+00:00

I`m trying to create a message which uses some kind of pluralization. The message

  • 0

I`m trying to create a message which uses some kind of pluralization. The message look like this and depends on the number of deleted objects.

Successfully deleted [number of objects] Contact(s)

Thus output can be:

Successfully deleted 1 Contact
Successfully deleted 5 Contacts

To achieve this task i followed the pluralization documentation which i referenced below:

pluralization

My code in the view:

count = returned_objects.count()
    if count == 1:
        name = model._meta.verbose_name
    else:
        name = model._meta.verbose_name_plural

    text = ungettext(
         'Successfully deleted %(count)d %(name)s .',
         'Successfully deleted %(count)d %(name)s .',
         count
    ) % {
        'count': count,
        'name': name
    }
    print text

My code in the model:

class Meta:
        verbose_name = _('contact')
        verbose_name_plural = _('contacts')

The result is now “Successfully deleted 1 django.utils.functional.proxy object at 0x014D9B70″

I`m wondering why I do not get the verbose_name as output. Instead i get django.utils.functional.proxy object as the output for name.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:37:44+00:00Added an answer on May 13, 2026 at 8:37 am

    When you look at the proxy object, you’ll see that it is a proxy object for a string-like class.

    Try using model._meta.verbose_name_plural.title() to get a string from the proxy object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create shared library (with CMake) which uses Qt objects (in particular
I'm trying to create an ejabberd module which uses mongodb-erlang as the driver. I'm
I'm trying to write some example of client-server application which uses linux messages. Here
I'm trying to create a message composer view on iOS which includes a recipient
Im trying to create a really basic NServicebus.Host application which sends a message every
am trying to create WCF client to consume the service, which contains messages. So
Trying to create a macro which can be used for print debug messages when
I am trying to create a keyword message style method, but I can't figure
I'm trying to create a very simple message board (author, text, and date written)
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.