Commits

Hynek Cernoch  committed 07ca29b

Fixed conversion of functional proxy to string/bytestring for Django 1.5

  • Participants
  • Parent commits b0e8fbe

Comments (0)

Files changed (2)

File livesettings/tests.py

         csrf_client.login(username='admin', password='secret')
         # get CSFR token
         response = csrf_client.get('/settings/')
-        csrfmiddlewaretoken = str(response.context['csrf_token'])
+        csrfmiddlewaretoken = response.context['csrf_token'] + ''
         self.assertContains(response, csrfmiddlewaretoken, msg_prefix='has not csrf')
         # expect OK
         response = csrf_client.post('/settings/', {'Group2__SingleItem': '1234', 'csrfmiddlewaretoken': csrfmiddlewaretoken})

File livesettings/values.py

                 work = []
                 for x in self.choices:
                     if x[0] in self.default:
-                        work.append(smart_str(x[1]))
+                        work.append('%s' % smart_str(x[1]))
                 note = gettext('Default value: ') + ", ".join(work)
 
             else: