Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1289 -- Improved 'inspectdb' to introspect decimal_places and …

…max_digits for FloatFields. Thanks, gandalf@owca.info

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 53ca15cd78cdcb881b31cc417f8709c10fafaadd 1 parent cf528aa
Adrian Holovaty authored February 18, 2006

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  django/core/management.py
4  django/core/management.py
@@ -633,6 +633,10 @@ def table2model(table_name):
633 633
                 if field_type == 'CharField' and row[3]:
634 634
                     extra_params['maxlength'] = row[3]
635 635
 
  636
+                if field_type == 'FloatField':
  637
+                    extra_params['max_digits'] = row[4]
  638
+                    extra_params['decimal_places'] = row[5]
  639
+
636 640
                 # Add primary_key and unique, if necessary.
637 641
                 column_name = extra_params.get('db_column', att_name)
638 642
                 if column_name in indexes:

0 notes on commit 53ca15c

Please sign in to comment.
Something went wrong with that request. Please try again.