Template
<script>
$(document).ready(function() {
$('#id_medicamento').select2();
});
</script>
forms.py
class StockmovForm(forms.ModelForm):
class Meta:
model = Stockmov
fields = ['medicamento', 'motivo', 'Cantidad' ]
widgets = {
'medicamento': forms.Select(attrs={'class':'form-control', 'placeholder':'Medicamento'}),
'motivo': forms.TextInput(attrs={'class':'form-control', 'placeholder':'Motivo'}),
'Cantidad': forms.NumberInput(attrs={'class':'form-control', 'placeholder':'Cantidad'}),
}
labels = {
'medicamento':'Medicamento', 'motivo':'Motivo del Movimiento', 'Cantidad':'Cantidad del Movimiento',
}cya!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/69572c34-5ea6-425a-b0f4-b148438d6883n%40googlegroups.com.