Ticket #7038: django.contrib.formtools.7828.patch

File django.contrib.formtools.7828.patch, 842 bytes (added by rishi, 12 years ago)

django.contrib.formtools.7828.patch

  • django/contrib/formtools/wizard.py

     
    146146        Subclasses may want to take into account request-specific information,
    147147        such as the IP address.
    148148        """
    149         data = [(bf.name, bf.data or '') for bf in form] + [settings.SECRET_KEY]
     149        data = [settings.SECRET_KEY]
     150        for bf in form:
     151            d = unicode(bf.data) if bf.data is not None else ''
     152            n = bf.name
     153            data.append((n,d))
    150154        # Use HIGHEST_PROTOCOL because it's the most efficient. It requires
    151155        # Python 2.3, but Django requires 2.3 anyway, so that's OK.
    152156        pickled = pickle.dumps(data, pickle.HIGHEST_PROTOCOL)
Back to Top