Modify ↓
Ticket #347 (closed defect: fixed)
Decimal field cannot contain default values
| Reported by: | jbar@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7 |
| Component: | migrations | Version: | 0.7-pre |
| Keywords: | default values | Cc: |
Description
If model contains a decimal field with a default value, as in
price = DecimalField(default=Decimal('1.0'))
south will complain about missing definition of Decimal. Now I have to include
from decimal import Decimal
in every migration which uses this model. In the versions prior to 0.7-pre, importing Decimal at the beginning of the model definition was enough, because south would put
from myproject.apps.myapp.models import *
at the beginning of migration.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

Fixed in [eb57707fb001].