Skip to content

Commit

Permalink
Fixes #29
Browse files Browse the repository at this point in the history
  • Loading branch information
martinarroyo committed Mar 29, 2016
1 parent d7048d0 commit 1bbf6d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mapa/forms.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
from django.forms import ModelForm
from .models import Reporte
from tasas.models import Universidad
from django.forms.widgets import Select
from django.utils.functional import lazy
from tasas.models import curso_choices


class ReporteForm(ModelForm):
def __init__(self, *args, **kwargs):
super(ReporteForm, self).__init__(*args, **kwargs)
self.fields['universidad'].choices = [(e.id, "%s - %s" % (e.nombre, e.centro)) for e in Universidad.objects.all()]

class Meta:
model = Reporte
exclude = ('id','estado')
Expand Down

0 comments on commit 1bbf6d0

Please sign in to comment.