Browse Source

Teste com auto-complete

pull/6/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
committed by Luciano Almeida
parent
commit
9b8effabbd
  1. 1
      requirements/requirements.txt
  2. 8
      sigi/apps/usuarios/forms.py
  3. 1
      sigi/settings/base.py

1
requirements/requirements.txt

@ -17,6 +17,7 @@ django-image-cropping==1.0.3
django-localflavor==1.3
django-model-utils==2.4
django-sass-processor==0.3.4
django-easy-select2==1.3.2
django-simple-captcha==0.5.1
Django==1.9.6
libsass==0.11.0

8
sigi/apps/usuarios/forms.py

@ -14,7 +14,8 @@ from django.core.exceptions import ValidationError
from django.db import transaction
from django.forms import ModelForm
from django.utils.translation import ugettext_lazy as _
from sigi.apps.casas.models import CasaLegislativa
from easy_select2 import Select2
import sigi.apps.crispy_layout_mixin
from sigi.apps.crud.utils import YES_NO_CHOICES
@ -87,6 +88,11 @@ class UsuarioForm(ModelForm):
captcha = CaptchaField()
casa_legislativa = forms.ModelChoiceField(
queryset=CasaLegislativa.objects.all(),
widget=Select2()
)
class Meta(object):
model = Usuario
fields = [u'username', u'email', u'nome_completo', u'password',

1
sigi/settings/base.py

@ -93,6 +93,7 @@ INSTALLED_APPS = (
'djangobower',
'floppyforms',
'sass_processor',
'easy_select2',
)

Loading…
Cancel
Save