diaspy can set interface language
authorMarek Marecki <marekjm@taistelu.com>
Thu, 22 Aug 2013 14:12:59 +0000 (16:12 +0200)
committerMarek Marecki <marekjm@taistelu.com>
Thu, 22 Aug 2013 14:12:59 +0000 (16:12 +0200)
diaspy/settings.py

index 5ee46fa8259213e839e6f302ed71fe263c86dc46..bbb6ffea0ff4dca0019455bc421883cd11f1db36 100644 (file)
@@ -38,9 +38,11 @@ class Settings():
 
     def setLanguage(self, lang):
         """Changes user's email.
+
+        :param lang: language identifier from getLanguages()
         """
         data = {'_method': 'put', 'utf-8': '✓', 'user[language]': lang, 'authenticity_token': repr(self._connection)}
-        request = self._connection.post('user')
+        request = self._connection.post('user', data=data)
 
     def getLanguages(self):
         """Returns a list of tuples containing ('Language name', 'identifier').