~ubuntuone-pqm-team/canonical-identity-provider/trunk

« back to all changes in this revision

Viewing changes to identityprovider/fields.py

  • Committer: Danny Tamez
  • Date: 2010-04-21 15:29:24 UTC
  • Revision ID: danny.tamez@canonical.com-20100421152924-lq1m92tstk2iz75a
Canonical SSO Provider (Open Source) - Initial Commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2010 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
from django.forms import MultipleChoiceField
 
5
from identityprovider.widgets import CommaSeparatedWidget
 
6
 
 
7
 
 
8
class CommaSeparatedField(MultipleChoiceField):
 
9
    widget = CommaSeparatedWidget
 
10
 
 
11
    def clean(self, value):
 
12
        return ','.join(super(CommaSeparatedField, self).clean(value))