Merge branch 'hotfix/0.2.10'

This commit is contained in:
baccenfutter 2013-11-12 23:42:12 +01:00
commit 4c390e5d2e
3 changed files with 4 additions and 6 deletions

View file

@ -173,13 +173,11 @@ class MemberValues(object):
if (result_data == []): if (result_data == []):
break break
else: else:
## here you don't have to append to a list
## you could do whatever you want with the individual entry
## The appending to list is just for illustration.
if result_type == ldap.RES_SEARCH_ENTRY: if result_type == ldap.RES_SEARCH_ENTRY:
result_set.append(result_data) result_set.append(result_data)
userlist = [x[0][1]['uid'][0] for x in result_set] # list comprehension to get a list of user tupels in the format ("nickname", "nickname (real name)")
userlist = [(x[0][1]['uid'][0], '%s (%s)' % (x[0][1]['uid'][0], x[0][1]['cn'][0])) for x in result_set]
return sorted(userlist) return sorted(userlist)
except: except:
return [] return []

View file

@ -137,7 +137,7 @@ class AdminForm(forms.Form):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
self._request = kwargs.pop('request', None) self._request = kwargs.pop('request', None)
self._users = kwargs.pop('users', []) self._users = kwargs.pop('users', [])
choices = [(x, x) for x in self._users] choices = [x for x in self._users]
choices.insert(0, ('', 'Select username ...')) choices.insert(0, ('', 'Select username ...'))
super(AdminForm, self).__init__(*args, **kwargs) super(AdminForm, self).__init__(*args, **kwargs)
self.fields.insert(0, 'username', forms.ChoiceField(choices=choices, self.fields.insert(0, 'username', forms.ChoiceField(choices=choices,

View file

@ -47,7 +47,7 @@
<span class="muted">{% blocktrans %}The external e-mail address is used by the <span class="muted">{% blocktrans %}The external e-mail address is used by the
board of c-base to reach you in cases where your c-base board of c-base to reach you in cases where your c-base
address (see above) is not working. To change your address (see above) is not working. To change your
externe e-mail address please contact the c-base board external e-mail address please contact the c-base board
(<a href="mailto:vorstand@c-base.org">vorstand@c-base.org</a>).{% endblocktrans %}</span> (<a href="mailto:vorstand@c-base.org">vorstand@c-base.org</a>).{% endblocktrans %}</span>
</li> </li>
<li> <li>