class ConferenceForm(ModelForm):
+
class Meta:
model = Conference
class UserForm(ModelForm):
- # first_name = forms.CharField(_('First name'), required=True)
- # last_name = forms.CharField(_('Last name'), required=True)
+
captcha = CaptchaField()
class Meta:
class StudentForm(ModelForm):
- def has_changed(self):
- """
- Overriding this, as the initial data passed to the form does not get noticed,
- and so does not get saved, unless it actually changes
- """
- changed_data = super(ModelForm, self).has_changed()
- return bool(self.initial or changed_data)
-
class Meta:
model = Student
exclude = ['user', 'trainings', 'options']
blank=True, null=True)
period = models.ForeignKey('Period', related_name='student', verbose_name=_('period'),
blank=True, null=True, on_delete=models.SET_NULL)
- platform_only = models.BooleanField(_('platform only'), help_text="")
+ platform_only = models.BooleanField(_('e-learning platform only'))
application_fees = models.BooleanField(_('application fees'), blank=True)
default_application_fees = 40
subscription_fees = models.FloatField(_('subscription fees'), help_text='€', blank=True, null=True)
<form class="register" id="_registerForm" method="post" action="" enctype="multipart/form-data" data-ajax="false">{% csrf_token %}
<table>
{{ form }}
+ <hr>
{% for formset in inlines %}
{{ formset.management_form }}
{% for form in formset %}
+ <hr>
{{form }}
{% endfor %}
{% endfor %}
</form>
</center>
{% endblock %}
-
-