summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/core/management.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/core/management.py b/django/core/management.py
index 5c5f067892..f4ef6cd954 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -633,6 +633,10 @@ def inspectdb(db_name):
if field_type == 'CharField' and row[3]:
extra_params['maxlength'] = row[3]
+ if field_type == 'FloatField':
+ extra_params['max_digits'] = row[4]
+ extra_params['decimal_places'] = row[5]
+
# Add primary_key and unique, if necessary.
column_name = extra_params.get('db_column', att_name)
if column_name in indexes: