Django

Code

Changeset 7277

Show
Ignore:
Timestamp:
03/17/08 19:17:59 (6 months ago)
Author:
adrian
Message:

Fixed corner-case bug in formtools wizard.py and preview.py, in case of a None value -- thanks, Honza

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/formtools/preview.py

    r7131 r7277  
    106106        such as the IP address. 
    107107        """ 
    108         data = [(bf.name, bf.data) for bf in form] + [settings.SECRET_KEY] 
     108        data = [(bf.name, bf.data or '') for bf in form] + [settings.SECRET_KEY] 
    109109        # Use HIGHEST_PROTOCOL because it's the most efficient. It requires 
    110110        # Python 2.3, but Django requires 2.3 anyway, so that's OK. 
  • django/trunk/django/contrib/formtools/wizard.py

    r7263 r7277  
    147147        such as the IP address. 
    148148        """ 
    149         data = [(bf.name, bf.data) for bf in form] + [settings.SECRET_KEY] 
     149        data = [(bf.name, bf.data or '') for bf in form] + [settings.SECRET_KEY] 
    150150        # Use HIGHEST_PROTOCOL because it's the most efficient. It requires 
    151151        # Python 2.3, but Django requires 2.3 anyway, so that's OK. 
     
    199199            step0      -- The current step (zero-based). 
    200200            step       -- The current step (one-based). 
     201            step_count -- The total number of steps. 
    201202            form       -- The Form instance for the current step (either empty 
    202203                          or with errors).