prepare for authentic changing serialization methods
This commit is contained in:
parent
52abb3bac8
commit
22b4d574a1
|
@ -11,6 +11,5 @@ Package: python-authentic2-auth-fedict
|
|||
Architecture: all
|
||||
Depends: ${misc:Depends},
|
||||
python-authentic2 (>= 2.1.20.1054)
|
||||
Conflicts: python-authentic2 (> 2.1.20.1137)
|
||||
Description: Fedict authentication frontend for Authentic2
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import json
|
||||
|
||||
import django.apps
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.auth.signals import user_logged_in
|
||||
|
@ -63,20 +65,32 @@ class Plugin(object):
|
|||
return [
|
||||
{'label': _('National Register Number'),
|
||||
'name': 'nrn',
|
||||
'serialize': json.dumps,
|
||||
'deserialize': json.loads,
|
||||
'field_class': fields.NrnField, },
|
||||
{'label': _('Date'),
|
||||
'serialize': json.dumps,
|
||||
'deserialize': json.loads,
|
||||
'name': 'date',
|
||||
'field_class': fields.DateField, },
|
||||
{'label': _('Street'),
|
||||
'serialize': json.dumps,
|
||||
'deserialize': json.loads,
|
||||
'name': 'street',
|
||||
'field_class': fields.StreetField, },
|
||||
{'label': _('House number'),
|
||||
'serialize': json.dumps,
|
||||
'deserialize': json.loads,
|
||||
'name': 'num_house',
|
||||
'field_class': fields.NumHouseField, },
|
||||
{'label': _('Phone number'),
|
||||
'serialize': json.dumps,
|
||||
'deserialize': json.loads,
|
||||
'name': 'phone',
|
||||
'field_class': fields.NumPhoneField, },
|
||||
{'label': _('Country'),
|
||||
'serialize': json.dumps,
|
||||
'deserialize': json.loads,
|
||||
'name': 'country',
|
||||
'field_class': fields.CountryField, },
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue