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

  • Home
  • SEARCH
  • 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 522437
In Process

The Archive Base Latest Questions

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

If 5 and 5.00 and 5.000 are all different, then why does Django’s decimal

  • 0

If 5 and 5.00 and 5.000 are all different, then why does Django’s decimal field save without the .00 even when I have decimal_places=2

?

More importantly, how can I save a value 5.00 as 5.00 in Django without using String.

  • 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:21:14+00:00Added an answer on May 13, 2026 at 8:21 am

    I think it would be more correct to say those are different representations of the same value ‘5’.

    Internally, the value saved (unless you’re actually storing a string) is 5.

    When the value is displayed, ie converted to a string representation for the screen, it might be shown as 5, 5.00 or 5.000 but internally, it’s still 5

    The two decimal places do not appear (if I can put it that way) until the value is output.

    You can’t save a number with 2 decimal places unless you use a string.

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

Sidebar

Related Questions

i have total 70,000 records in database. currently i displays all the records in
I am trying to delete the all but the most recent 3,000 items in
Problem: How many of the first 100,000,000 hexagonal numbers are divisible by all the
We have a 2,000,000 lines of code application in Mercurial. Obviously there is a
I have a 500,000 line SQL script: UPDATE users SET region_id = 9814746 WHERE
I have 6,000 untracked files in one subdirectory and I'm constructing .gitignore files to
I've a table with about 130 000 records with telephonenumbers. The numbers are all
I have configured numerous .gitignore files to filter out many different unwanted files from
Problem: I have about 50,000 rows in Excel. Each row contains a the word
I have asked this question in a different post here on SO: How 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.