Skip to content

Commit

Permalink
Merge pull request #30 from RITSI/fix-29
Browse files Browse the repository at this point in the history
Fixes #29
  • Loading branch information
jcabala14 authored Feb 1, 2018
2 parents 9a1a942 + cc703c1 commit c4b682c
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


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 c4b682c

Please sign in to comment.