From aebabac1cdd22e3429e8a3697b64f840d031b30e Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 11 Jul 2017 15:56:01 +0200 Subject: [PATCH] update registration form --- prawokultury/contact_forms.py | 22 ++- prawokultury/countries.py | 259 ++++++++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+), 14 deletions(-) create mode 100644 prawokultury/countries.py diff --git a/prawokultury/contact_forms.py b/prawokultury/contact_forms.py index 0a2cec0..9beda3d 100644 --- a/prawokultury/contact_forms.py +++ b/prawokultury/contact_forms.py @@ -11,6 +11,8 @@ from django.utils.translation import ugettext_lazy as _ from django.utils.safestring import mark_safe from migdal.models import Entry +from prawokultury.countries import COUNTRIES + mark_safe_lazy = lazy(mark_safe, unicode) @@ -28,7 +30,7 @@ class RegistrationForm(ContactForm): contact = forms.EmailField(label=_('E-mail'), max_length=128) organization = forms.CharField(label=_('Organization'), max_length=256, required=False) - country = forms.CharField(label=_('Country'), max_length=128) + country = forms.ChoiceField(label=_('Country'), choices=zip(COUNTRIES, COUNTRIES)) days = forms.ChoiceField( label=_("I'm planning to show up on"), @@ -48,6 +50,7 @@ class RegistrationForm(ContactForm): ('2', _('twice')), ('3', _('three times')), ('4', _('four times')), + ('5', _('five times')), ], widget=forms.RadioSelect()) age = forms.ChoiceField( required=False, @@ -61,18 +64,9 @@ class RegistrationForm(ContactForm): ('56-65', _('56-65')), ('66+', _('66 or above')), ], widget=forms.RadioSelect()) - distance = forms.ChoiceField( - required=False, - label=_("3. How far will you travel to attend CopyCamp?"), - choices=[ - ('0-50', _('0-50 km')), - ('51-100', _('51-100 km')), - ('101-200', _('101-200 km')), - ('200+', _('200 km or more')), - ], widget=forms.RadioSelect()) areas = forms.MultipleChoiceField( required=False, - label=_("4. Please indicate up to 3 areas you feel most affiliated with"), + label=_("3. Please indicate up to 3 areas you feel most affiliated with"), choices=[ ('sztuki plastyczne', _('visual art')), ('literatura', _('literature')), @@ -95,7 +89,7 @@ class RegistrationForm(ContactForm): areas_other = forms.CharField(required=False, label=_('Fill if you selected “other” above')) source = forms.ChoiceField( required=False, - label=_("5. Please indicate how you received information about the conference:"), + label=_("4. Please indicate how you received information about the conference:"), choices=[ ('znajomi', _('through friends sharing on the web')), ('znajomi2', _('through friends by other means')), @@ -109,9 +103,9 @@ class RegistrationForm(ContactForm): required=False, label=_("6. Please indicate the most important factor for your willingness to participate:"), choices=[ - ('idea', _('the main idea of the conference')), - ('speaker', _('particular speaker(s)')), + ('speaker', _('listening to particular speaker(s)')), ('networking', _('good networking occasion')), + ('partnering', _('partnering with organisations present at the event')), ('other', _('other (please specify below)')), ], widget=forms.RadioSelect()) motivation_other = forms.CharField(required=False, label=_('Fill if you selected “other” above')) diff --git a/prawokultury/countries.py b/prawokultury/countries.py new file mode 100644 index 0000000..9455b3c --- /dev/null +++ b/prawokultury/countries.py @@ -0,0 +1,259 @@ +# -*- coding: utf-8 -*- + +# curl http://www.geonames.org/countries/ | grep '[^<]*' -o | cut -d\> -f2 | +# cut -d\< -f1 | sort | sed 's/\(.*\)/ u"\1",/' + +COUNTRIES = [ + u"Afghanistan", + u"Åland", + u"Albania", + u"Algeria", + u"American Samoa", + u"Andorra", + u"Angola", + u"Anguilla", + u"Antarctica", + u"Antigua and Barbuda", + u"Argentina", + u"Armenia", + u"Aruba", + u"Australia", + u"Austria", + u"Azerbaijan", + u"Bahamas", + u"Bahrain", + u"Bangladesh", + u"Barbados", + u"Belarus", + u"Belgium", + u"Belize", + u"Benin", + u"Bermuda", + u"Bhutan", + u"Bolivia", + u"Bonaire", + u"Bosnia and Herzegovina", + u"Botswana", + u"Bouvet Island", + u"Brazil", + u"British Indian Ocean Territory", + u"British Virgin Islands", + u"Brunei", + u"Bulgaria", + u"Burkina Faso", + u"Burundi", + u"Cambodia", + u"Cameroon", + u"Canada", + u"Cape Verde", + u"Cayman Islands", + u"Central African Republic", + u"Chad", + u"Chile", + u"China", + u"Christmas Island", + u"Cocos [Keeling] Islands", + u"Colombia", + u"Comoros", + u"Cook Islands", + u"Costa Rica", + u"Croatia", + u"Cuba", + u"Curacao", + u"Cyprus", + u"Czech Republic", + u"Democratic Republic of the Congo", + u"Denmark", + u"Djibouti", + u"Dominica", + u"Dominican Republic", + u"East Timor", + u"Ecuador", + u"Egypt", + u"El Salvador", + u"Equatorial Guinea", + u"Eritrea", + u"Estonia", + u"Ethiopia", + u"Falkland Islands", + u"Faroe Islands", + u"Fiji", + u"Finland", + u"France", + u"French Guiana", + u"French Polynesia", + u"French Southern Territories", + u"Gabon", + u"Gambia", + u"Georgia", + u"Germany", + u"Ghana", + u"Gibraltar", + u"Greece", + u"Greenland", + u"Grenada", + u"Guadeloupe", + u"Guam", + u"Guatemala", + u"Guernsey", + u"Guinea", + u"Guinea-Bissau", + u"Guyana", + u"Haiti", + u"Heard Island and McDonald Islands", + u"Honduras", + u"Hong Kong", + u"Hungary", + u"Iceland", + u"India", + u"Indonesia", + u"Iran", + u"Iraq", + u"Ireland", + u"Isle of Man", + u"Israel", + u"Italy", + u"Ivory Coast", + u"Jamaica", + u"Japan", + u"Jersey", + u"Jordan", + u"Kazakhstan", + u"Kenya", + u"Kiribati", + u"Kosovo", + u"Kuwait", + u"Kyrgyzstan", + u"Laos", + u"Latvia", + u"Lebanon", + u"Lesotho", + u"Liberia", + u"Libya", + u"Liechtenstein", + u"Lithuania", + u"Luxembourg", + u"Macao", + u"Macedonia", + u"Madagascar", + u"Malawi", + u"Malaysia", + u"Maldives", + u"Mali", + u"Malta", + u"Marshall Islands", + u"Martinique", + u"Mauritania", + u"Mauritius", + u"Mayotte", + u"Mexico", + u"Micronesia", + u"Moldova", + u"Monaco", + u"Mongolia", + u"Montenegro", + u"Montserrat", + u"Morocco", + u"Mozambique", + u"Myanmar [Burma]", + u"Namibia", + u"Nauru", + u"Nepal", + u"Netherlands", + u"Netherlands Antilles", + u"New Caledonia", + u"New Zealand", + u"Nicaragua", + u"Niger", + u"Nigeria", + u"Niue", + u"Norfolk Island", + u"Northern Mariana Islands", + u"North Korea", + u"Norway", + u"Oman", + u"Pakistan", + u"Palau", + u"Palestine", + u"Panama", + u"Papua New Guinea", + u"Paraguay", + u"Peru", + u"Philippines", + u"Pitcairn Islands", + u"Poland", + u"Portugal", + u"Puerto Rico", + u"Qatar", + u"Republic of the Congo", + u"Réunion", + u"Romania", + u"Russia", + u"Rwanda", + u"Saint Barthélemy", + u"Saint Helena", + u"Saint Kitts and Nevis", + u"Saint Lucia", + u"Saint Martin", + u"Saint Pierre and Miquelon", + u"Saint Vincent and the Grenadines", + u"Samoa", + u"San Marino", + u"São Tomé and Príncipe", + u"Saudi Arabia", + u"Senegal", + u"Serbia", + u"Serbia and Montenegro", + u"Seychelles", + u"Sierra Leone", + u"Singapore", + u"Sint Maarten", + u"Slovakia", + u"Slovenia", + u"Solomon Islands", + u"Somalia", + u"South Africa", + u"South Georgia and the South Sandwich Islands", + u"South Korea", + u"South Sudan", + u"Spain", + u"Sri Lanka", + u"Sudan", + u"Suriname", + u"Svalbard and Jan Mayen", + u"Swaziland", + u"Sweden", + u"Switzerland", + u"Syria", + u"Taiwan", + u"Tajikistan", + u"Tanzania", + u"Thailand", + u"Togo", + u"Tokelau", + u"Tonga", + u"Trinidad and Tobago", + u"Tunisia", + u"Turkey", + u"Turkmenistan", + u"Turks and Caicos Islands", + u"Tuvalu", + u"Uganda", + u"Ukraine", + u"United Arab Emirates", + u"United Kingdom", + u"United States", + u"Uruguay", + u"U.S. Minor Outlying Islands", + u"U.S. Virgin Islands", + u"Uzbekistan", + u"Vanuatu", + u"Vatican City", + u"Venezuela", + u"Vietnam", + u"Wallis and Futuna", + u"Western Sahara", + u"Yemen", + u"Zambia", + u"Zimbabwe", +] -- 2.20.1