Files
django-dav-events/dav_events/forms/participant.py
heinzel dab2e5cb76 FIX: some participant values were removed if participant was edited
Some participant fields were not included in the form template and
thus every time the form was saved those values were emptied.
We exclude those fileds now within the form class.
2020-12-18 11:43:35 +01:00

18 lines
540 B
Python

# -*- coding: utf-8 -*-
from django import forms
from ..models import Participant
class ParticipantForm(forms.ModelForm):
class Meta:
model = Participant
exclude = ['event', 'created_at', 'position',
'privacy_policy', 'privacy_policy_accepted',
'paid', 'purge_at']
widgets = {
'emergency_contact': forms.Textarea(attrs={'rows': 4}),
'experience': forms.Textarea(attrs={'rows': 5}),
'note': forms.Textarea(attrs={'rows': 5}),
}