Fixing accommodation typo.
--- a/project/scipycon/registration/forms.py Tue Nov 30 15:51:23 2010 +0530
+++ b/project/scipycon/registration/forms.py Tue Nov 30 15:58:17 2010 +0530
@@ -96,23 +96,23 @@
accommodation_required = self.cleaned_data['accommodation_required']
accommodation_days = sum(filter([a1, a2, a3, a4, a5, a6]))
- a1 = self.cleaned_data['accomodation_on_1st']
- a2 = self.cleaned_data['accomodation_on_2nd']
- a3 = self.cleaned_data['accomodation_on_3rd']
- a4 = self.cleaned_data['accomodation_on_4th']
- a5 = self.cleaned_data['accomodation_on_5th']
- a6 = self.cleaned_data['accomodation_on_6th']
+ a1 = self.cleaned_data['accommodation_on_1st']
+ a2 = self.cleaned_data['accommodation_on_2nd']
+ a3 = self.cleaned_data['accommodation_on_3rd']
+ a4 = self.cleaned_data['accommodation_on_4th']
+ a5 = self.cleaned_data['accommodation_on_5th']
+ a6 = self.cleaned_data['accommodation_on_6th']
acco.sex = sex
acco.accommodation_required = accommodation_required
- acco.accommodation_days = accomodation_days
+ acco.accommodation_days = _days
- acco.accomodation_on_1st = a1
- acco.accomodation_on_2nd = a2
- acco.accomodation_on_3rd = a3
- acco.accomodation_on_4th = a4
- acco.accomodation_on_5th = a5
- acco.accomodation_on_6th = a6
+ acco._on_1st = a1
+ acco._on_2nd = a2
+ acco._on_3rd = a3
+ acco._on_4th = a4
+ acco._on_5th = a5
+ acco._on_6th = a6
acco.save()
@@ -129,12 +129,12 @@
sex = self.cleaned_data['sex']
accommodation_required = self.cleaned_data['accommodation_required']
- a1 = self.cleaned_data['accomodation_on_1st']
- a2 = self.cleaned_data['accomodation_on_2nd']
- a3 = self.cleaned_data['accomodation_on_3rd']
- a4 = self.cleaned_data['accomodation_on_4th']
- a5 = self.cleaned_data['accomodation_on_5th']
- a6 = self.cleaned_data['accomodation_on_6th']
+ a1 = self.cleaned_data['_on_1st']
+ a2 = self.cleaned_data['_on_2nd']
+ a3 = self.cleaned_data['_on_3rd']
+ a4 = self.cleaned_data['_on_4th']
+ a5 = self.cleaned_data['_on_5th']
+ a6 = self.cleaned_data['_on_6th']
selected_a_date = any([a1, a2, a3, a4, a5, a6])
@@ -150,12 +150,12 @@
model = Accommodation
fields = ('accommodation_required',
'sex',
- 'accomodation_on_1st',
- 'accomodation_on_2nd',
- 'accomodation_on_3rd',
- 'accomodation_on_4th',
- 'accomodation_on_5th',
- 'accomodation_on_6th',
+ '_on_1st',
+ '_on_2nd',
+ '_on_3rd',
+ '_on_4th',
+ '_on_5th',
+ '_on_6th',
)
--- a/project/scipycon/registration/models.py Tue Nov 30 15:51:23 2010 +0530
+++ b/project/scipycon/registration/models.py Tue Nov 30 15:58:17 2010 +0530
@@ -73,17 +73,17 @@
verbose_name="Accommodation required",
help_text="Check if you need accommodation.")
- accomodation_on_1st = models.BooleanField(default=False,
+ accommodation_on_1st = models.BooleanField(default=False,
verbose_name="First day")
- accomodation_on_2nd = models.BooleanField(default=False,
+ accommodation_on_2nd = models.BooleanField(default=False,
verbose_name="Second day")
- accomodation_on_3rd = models.BooleanField(default=False,
+ accommodation_on_3rd = models.BooleanField(default=False,
verbose_name="Third day")
- accomodation_on_4th = models.BooleanField(default=False,
+ accommodation_on_4th = models.BooleanField(default=False,
verbose_name="Fourth day")
- accomodation_on_5th = models.BooleanField(default=False,
+ accommodation_on_5th = models.BooleanField(default=False,
verbose_name="Fifth day")
- accomodation_on_6th = models.BooleanField(default=False,
+ accommodation_on_6th = models.BooleanField(default=False,
verbose_name="Sixth day")
accommodation_days = models.IntegerField(
--- a/project/templates/registration/submit-registration.html Tue Nov 30 15:51:23 2010 +0530
+++ b/project/templates/registration/submit-registration.html Tue Nov 30 15:58:17 2010 +0530
@@ -8,31 +8,31 @@
$(document).ready(function(){
if (!$('#id_accommodation_required').is(':checked')) {
$('#id_sex').attr('disabled', 'disabled');
- $('#id_accomodation_on_1st').attr('disabled', 'disabled');
- $('#id_accomodation_on_2nd').attr('disabled', 'disabled');
- $('#id_accomodation_on_3rd').attr('disabled', 'disabled');
- $('#id_accomodation_on_4th').attr('disabled', 'disabled');
- $('#id_accomodation_on_5th').attr('disabled', 'disabled');
- $('#id_accomodation_on_6th').attr('disabled', 'disabled');
+ $('#id_accommodation_on_1st').attr('disabled', 'disabled');
+ $('#id_accommodation_on_2nd').attr('disabled', 'disabled');
+ $('#id_accommodation_on_3rd').attr('disabled', 'disabled');
+ $('#id_accommodation_on_4th').attr('disabled', 'disabled');
+ $('#id_accommodation_on_5th').attr('disabled', 'disabled');
+ $('#id_accommodation_on_6th').attr('disabled', 'disabled');
}
$('#id_accommodation_required').change(function() {
if (!$('#id_accommodation_required').is(':checked')) {
$('#id_sex').attr('disabled', 'disabled');
- $('#id_accomodation_on_1st').attr('disabled', 'disabled');
- $('#id_accomodation_on_2nd').attr('disabled', 'disabled');
- $('#id_accomodation_on_3rd').attr('disabled', 'disabled');
- $('#id_accomodation_on_4th').attr('disabled', 'disabled');
- $('#id_accomodation_on_5th').attr('disabled', 'disabled');
- $('#id_accomodation_on_6th').attr('disabled', 'disabled');
+ $('#id_accommodation_on_1st').attr('disabled', 'disabled');
+ $('#id_accommodation_on_2nd').attr('disabled', 'disabled');
+ $('#id_accommodation_on_3rd').attr('disabled', 'disabled');
+ $('#id_accommodation_on_4th').attr('disabled', 'disabled');
+ $('#id_accommodation_on_5th').attr('disabled', 'disabled');
+ $('#id_accommodation_on_6th').attr('disabled', 'disabled');
} else {
$('#id_accommodation_days').removeAttr('disabled');
$('#id_sex').removeAttr('disabled');
- $('#id_accomodation_on_1st').removeAttr('disabled', 'disabled');
- $('#id_accomodation_on_2nd').removeAttr('disabled', 'disabled');
- $('#id_accomodation_on_3rd').removeAttr('disabled', 'disabled');
- $('#id_accomodation_on_4th').removeAttr('disabled', 'disabled');
- $('#id_accomodation_on_5th').removeAttr('disabled', 'disabled');
- $('#id_accomodation_on_6th').removeAttr('disabled', 'disabled');
+ $('#id_accommodation_on_1st').removeAttr('disabled', 'disabled');
+ $('#id_accommodation_on_2nd').removeAttr('disabled', 'disabled');
+ $('#id_accommodation_on_3rd').removeAttr('disabled', 'disabled');
+ $('#id_accommodation_on_4th').removeAttr('disabled', 'disabled');
+ $('#id_accommodation_on_5th').removeAttr('disabled', 'disabled');
+ $('#id_accommodation_on_6th').removeAttr('disabled', 'disabled');
}
});