gestioCOF/gestioncof/autocomplete_light_registry.py

11 lines
304 B
Python
Raw Normal View History

2016-07-15 00:02:56 +02:00
# -*- coding: utf-8 -*-
import autocomplete_light
from django.contrib.auth.models import User
autocomplete_light.register(
User, search_fields=('username', 'first_name', 'last_name'),
autocomplete_js_attributes={'placeholder': 'membre...'},
widget_attrs={'data-widget-minimum-values': 3})