-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathforms.py
30 lines (22 loc) · 788 Bytes
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 *-*
from google.appengine.ext.db import djangoforms
from db.model import (Attendee, Talk, Tshirt)
class AttendeeForm(djangoforms.ModelForm):
class Meta:
model = Attendee
exclude = ['userId', 'profile', 'assist_dinner']
model.country.default = 'Argentina'
model.state.default = 'Cordoba'
model.level.default = 'Principiante'
class TalkForm(djangoforms.ModelForm):
class Meta:
model = Talk
exclude = ['userId', 'profile']
model.level.default = 'Principiante'
class TshirtForm(djangoforms.ModelForm):
class Meta:
model = Tshirt
exclude = ['userId', 'profile']
model.color.default = 'Negro'
model.total.default = '1'
model.model.default = 'Hombre'